Assert.assertEquals("in My journal ser. 2, 34", defaultStrategy.getNomRefTitleWithoutYearAndAuthor((ReferenceBase)article1));\r
}\r
\r
+ @Test \r
+ public void testOldExistingBugs(){\r
+ journal1.setTitle("Univ. Calif. Publ. Bot.");\r
+ journal1.setAuthorTeam(null);\r
+ \r
+ Team articleAuthor = Team.NewTitledInstance("Babc. & Stebbins", "Babc. & Stebbins");\r
+ article1.setTitle("");\r
+ article1.setInJournal(journal1);\r
+ article1.setAuthorTeam(articleAuthor);\r
+ article1.setVolume("18");\r
+ article1.setDatePublished(TimePeriod.NewInstance(1943));\r
+ Assert.assertEquals("Babc. & Stebbins in Univ. Calif. Publ. Bot. 18. 1943", defaultStrategy.getTitleCache((ReferenceBase)article1));\r
+ }\r
+ \r
}\r
Assert.assertEquals("in Book Author, My book: 55. 1975", bookSection1.getNomenclaturalCitation(detail1));\r
}\r
\r
+ @Test\r
+ public void testRealExample(){\r
+ Team bookTeam = Team.NewTitledInstance("Chaudhary S. A.(ed.)", "Chaudhary S. A.(ed.)");\r
+ IBook book = ReferenceFactory.newBook();\r
+ book.setTitle("Flora of the Kingdom of Saudi Arabia");\r
+ book.setAuthorTeam(bookTeam);\r
+ book.setVolume("2(3)");\r
+ book.setPlacePublished("Riyadh");\r
+ book.setPublisher("National Herbarium");\r
+ book.setDatePublished(TimePeriod.NewInstance(2000));\r
+ \r
+ Team sectionTeam = Team.NewTitledInstance("Chaudhary S. A.", "Chaudhary S. A.");\r
+ IBookSection bookSection = ReferenceFactory.newBookSection();\r
+ bookSection.setTitle("73. Hedypnois - 87. Crepis");\r
+ bookSection.setInBook(book);\r
+ bookSection.setAuthorTeam(sectionTeam);\r
+ bookSection.setPages("222-251");\r
+ System.out.println(bookSection.getTitleCache());\r
+ Assert.assertEquals("Chaudhary S. A. - 73. Hedypnois - 87. Crepis in Chaudhary S. A.(ed.), Flora of the Kingdom of Saudi Arabia 2(3). 2000", bookSection.getTitleCache());\r
+ \r
+ }\r
+ \r
}\r