Revision 64223995
Added by Andreas Müller almost 3 years ago
cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/cache/taxon/TaxonBaseDefaultCacheStrategyTest.java | ||
---|---|---|
231 | 231 |
//make it a MAN only |
232 | 232 |
Taxon mainTaxon = Taxon.NewInstance(TaxonNameFactory.NewBacterialInstance(Rank.SPECIES()), ReferenceFactory.newBook() ); |
233 | 233 |
mainTaxon.addMisappliedName(man, null, null); |
234 |
assertEquals("Taxon titlecache must use sensu", expectedNameTitleCache + " sensu Sp.Pl.", cacheStrategy.getTitleCache(man));
|
|
234 |
assertEquals("Taxon titlecache must use sensu", expectedNameCache + " sensu Sp.Pl., non (L.) Mill.", cacheStrategy.getTitleCache(man));
|
|
235 | 235 |
|
236 | 236 |
//add another from relation |
237 | 237 |
Taxon relatedTaxon = Taxon.NewInstance(TaxonNameFactory.NewBacterialInstance(Rank.SPECIES()), ReferenceFactory.newBook() ); |
238 | 238 |
TaxonRelationship rel = man.addTaxonRelation(relatedTaxon, TaxonRelationshipType.CONGRUENT_TO(), null, null); |
239 | 239 |
assertEquals("Taxon titlecache must use sec", expectedNameTitleCache + " sec. Sp.Pl.", cacheStrategy.getTitleCache(man)); |
240 | 240 |
man.removeTaxonRelation(rel); |
241 |
assertEquals("Taxon titlecache must use sensu", expectedNameTitleCache + " sensu Sp.Pl.", cacheStrategy.getTitleCache(man));
|
|
241 |
assertEquals("Taxon titlecache must use sensu", expectedNameCache + " sensu Sp.Pl., non (L.) Mill.", cacheStrategy.getTitleCache(man));
|
|
242 | 242 |
|
243 | 243 |
//add another to relation |
244 | 244 |
rel = relatedTaxon.addTaxonRelation(man, TaxonRelationshipType.CONGRUENT_TO(), null, null); |
245 | 245 |
assertEquals("Taxon titlecache must use sec", expectedNameTitleCache + " sec. Sp.Pl.", cacheStrategy.getTitleCache(man)); |
246 | 246 |
man.removeTaxonRelation(rel); |
247 |
assertEquals("Taxon titlecache must use sensu", expectedNameTitleCache + " sensu Sp.Pl.", cacheStrategy.getTitleCache(man));
|
|
247 |
assertEquals("Taxon titlecache must use sensu", expectedNameCache + " sensu Sp.Pl., non (L.) Mill.", cacheStrategy.getTitleCache(man));
|
|
248 | 248 |
|
249 | 249 |
//add taxon node |
250 | 250 |
Classification c = Classification.NewInstance("Test"); |
251 | 251 |
TaxonNode tn = c.addChildTaxon(man, null); |
252 | 252 |
assertEquals("Taxon titlecache must use sec", expectedNameTitleCache + " sec. Sp.Pl.", cacheStrategy.getTitleCache(man)); |
253 | 253 |
man.removeTaxonNode(tn); |
254 |
assertEquals("Taxon titlecache must use sensu", expectedNameTitleCache + " sensu Sp.Pl.", cacheStrategy.getTitleCache(man));
|
|
254 |
assertEquals("Taxon titlecache must use sensu", expectedNameCache + " sensu Sp.Pl., non (L.) Mill.", cacheStrategy.getTitleCache(man));
|
|
255 | 255 |
} |
256 | 256 |
} |
Also available in: Unified diff
fix #9433 moved authorship to the non part at end, nom. status is not part anyway