Revision b0e33417
Added by unknown over 6 years ago
cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/parser/NonViralNameParserImplTest.java | ||
---|---|---|
370 | 370 |
name = parser.parseFullName(fullNameString); |
371 | 371 |
assertFalse(name.hasProblem()); |
372 | 372 |
assertNotNull(name.getCombinationAuthorship()); |
373 |
//removing space since #7094 |
|
374 |
assertEquals("H.Keng", name.getCombinationAuthorship().getNomenclaturalTitle()); |
|
373 |
assertEquals("H. Keng", name.getCombinationAuthorship().getNomenclaturalTitle()); |
|
375 | 374 |
|
376 | 375 |
//name without combination author , only to check if above fix for #5618 works correctly |
377 | 376 |
fullNameString = "Gordonia moaensis (Vict.)"; |
... | ... | |
566 | 565 |
assertTrue("Name must have binom hybrid bit set", name1.isBinomHybrid()); |
567 | 566 |
assertTrue("Name must have trinom hybrid bit set", name1.isTrinomHybrid()); |
568 | 567 |
assertFalse("Name must not be protected", name1.isProtectedTitleCache()); |
569 |
//remove space since #7094 |
|
570 |
assertEquals(nameStr.replace("E. Kl", "E.Kl"), name1.getTitleCache()); //we expect the cache strategy to create the same result |
|
568 |
assertEquals(nameStr, name1.getTitleCache()); //we expect the cache strategy to create the same result |
|
571 | 569 |
|
572 | 570 |
name1 = parser.parseReferencedName(nameStr); |
573 | 571 |
assertFalse("Name must not have monom hybrid bit set", name1.isMonomHybrid()); |
574 | 572 |
assertTrue("Name must have binom hybrid bit set", name1.isBinomHybrid()); |
575 | 573 |
assertTrue("Name must have trinom hybrid bit set", name1.isTrinomHybrid()); |
576 | 574 |
assertFalse("Name must not be protected", name1.isProtectedTitleCache()); |
575 |
assertEquals(nameStr, name1.getTitleCache()); //we expect the cache strategy to create the same result |
|
576 |
|
|
577 | 577 |
//remove space since #7094 |
578 |
parser.setRemoveSpaceAfterDot(true); |
|
579 |
name1 = parser.parseReferencedName(nameStr); |
|
578 | 580 |
assertEquals(nameStr.replace("E. Kl", "E.Kl"), name1.getTitleCache()); //we expect the cache strategy to create the same result |
581 |
parser.setRemoveSpaceAfterDot(false); |
|
579 | 582 |
|
580 | 583 |
} |
581 | 584 |
|
... | ... | |
2034 | 2037 |
+ " in Mem. NY. Bot. Gard. 22: 75. 1972"); |
2035 | 2038 |
Assert.assertFalse("Name should be parsable", name.isProtectedTitleCache()); |
2036 | 2039 |
combinationAuthor = name.getCombinationAuthorship(); |
2037 |
//remove space since #7094 |
|
2038 |
assertEquals( "W.R.Anderson", combinationAuthor.getNomenclaturalTitle()); |
|
2040 |
assertEquals( "W.R. Anderson", combinationAuthor.getNomenclaturalTitle()); |
|
2039 | 2041 |
nomRef = (Reference)name.getNomenclaturalReference(); |
2040 | 2042 |
assertEquals(ReferenceType.Article, nomRef.getType()); |
2041 | 2043 |
assertEquals("22", nomRef.getVolume()); |
... | ... | |
2129 | 2131 |
+ " in Phytologia 26 (6): 488-489, f. 1973"); |
2130 | 2132 |
Assert.assertFalse("Name should be parsable", name.isProtectedTitleCache()); |
2131 | 2133 |
combinationAuthor = name.getCombinationAuthorship(); |
2132 |
//remove space since #7094 |
|
2133 |
assertEquals( "L.O.Williams", combinationAuthor.getNomenclaturalTitle()); |
|
2134 |
assertEquals( "L.O. Williams", combinationAuthor.getNomenclaturalTitle()); |
|
2134 | 2135 |
nomRef = (Reference)name.getNomenclaturalReference(); |
2135 | 2136 |
assertEquals(ReferenceType.Article, nomRef.getType()); |
2136 | 2137 |
assertEquals("26 (6)", nomRef.getVolume()); |
Also available in: Unified diff
ref #7094 revert remove space between initials and name in nomencl. person title as default