+
+ @Test //#7443
+ public void testInAuthors() {
+ //base configuration
+ speciesName.setCombinationAuthorship(author);
+ speciesName.setBasionymAuthorship(basAuthor);
+ String expectedWithoutInAuthor = speciesNameString + " (" + basAuthorString + ") " + authorString;
+ Assert.assertEquals(expectedWithoutInAuthor, speciesName.getTitleCache());
+
+ //with in-authors
+ speciesName.setNameType(NomenclaturalCode.Fungi);
+ speciesName.setInBasionymAuthorship(inBasAuthor);
+ speciesName.setInCombinationAuthorship(inAuthor);
+ String expectedWithInAuthor = speciesNameString + " (" + basAuthorString + " in "+inBasAuthorString+") " + authorString + " in "+inAuthorString;
+ speciesName.setTitleCache(null, false);
+ Assert.assertEquals(expectedWithInAuthor, speciesName.getTitleCache());
+
+ //... for zoo-names
+ speciesName.setNameType(NomenclaturalCode.ICZN);
+ speciesName.setTitleCache(null, false);
+ Assert.assertEquals(expectedWithInAuthor, speciesName.getTitleCache());
+
+ //... for botanical names
+ speciesName.setNameType(NomenclaturalCode.ICNAFP);
+ speciesName.setTitleCache(null, false);
+ Assert.assertEquals("For now we do not allow in-authors for botanical names (except for fungi)",
+ expectedWithoutInAuthor, speciesName.getTitleCache());
+ }