Revision 0e8eea19
Added by Andreas Müller almost 8 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/TaxonComparator.java | ||
---|---|---|
243 | 243 |
} |
244 | 244 |
|
245 | 245 |
//nom. illeg. |
246 |
if (includeNomIlleg){ |
|
246 |
if (result == 0 && includeNomIlleg){
|
|
247 | 247 |
result = compareNomIlleg(name1, name2); |
248 | 248 |
if (result != 0){ |
249 | 249 |
return result; |
cdmlib-model/src/test/java/eu/etaxonomy/cdm/model/taxon/HomotypicGroupTaxonComparatorTest.java | ||
---|---|---|
380 | 380 |
|
381 | 381 |
} |
382 | 382 |
|
383 |
@Test //failing selenium test |
|
384 |
public void testCompare_NomIllegWithDate() { |
|
385 |
NomenclaturalStatus illegStatus = NomenclaturalStatus.NewInstance(NomenclaturalStatusType.ILLEGITIMATE()); |
|
386 |
botName3.addStatus(illegStatus); |
|
387 |
botName3.setNomenclaturalReference(ref1); |
|
388 |
botName2.setNomenclaturalReference(ref2); |
|
389 |
|
|
390 |
taxon1.addHomotypicSynonymName(botName3, null, null); |
|
391 |
taxon1.addHomotypicSynonymName(botName2, null, null); |
|
392 |
|
|
393 |
list.addAll(taxon1.getSynonyms()); |
|
394 |
Collections.sort(list, new HomotypicGroupTaxonComparator(taxon1)); |
|
395 |
|
|
396 |
Assert.assertEquals("Earlier nom. illeg. should come next", botName3, list.get(0).getName()); |
|
397 |
Assert.assertEquals("Later name should come last", botName2, list.get(1).getName()); |
|
398 |
|
|
399 |
} |
|
400 |
|
|
383 | 401 |
@Test |
384 | 402 |
public void testCompare_NoCircularProblemsWithBasionyms() { |
385 | 403 |
|
Also available in: Unified diff
Fix sort order for nom illeg with date #3338