Revision 0fa1381b
Added by Andreas Müller about 16 years ago
cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/cache/ZoologicalNameCacheStrategyTest.java | ||
---|---|---|
157 | 157 |
* Test method for {@link eu.etaxonomy.cdm.strategy.cache.BotanicNameDefaultCacheStrategy#getAuthorCache(eu.etaxonomy.cdm.model.common.CdmBase)}. |
158 | 158 |
*/ |
159 | 159 |
@Test |
160 |
public final void testGetAuthorCache() { |
|
160 |
public final void testGetAuthorshipCache() {
|
|
161 | 161 |
subSpeciesName.setCombinationAuthorTeam(author); |
162 |
assertEquals(authorString, strategy.getAuthorCache(subSpeciesName)); |
|
162 |
assertEquals(authorString, strategy.getAuthorshipCache(subSpeciesName));
|
|
163 | 163 |
subSpeciesName.setPublicationYear(publicationYear); |
164 |
assertEquals(authorString + ", " + publicationYear, strategy.getAuthorCache(subSpeciesName)); |
|
164 |
assertEquals(authorString + ", " + publicationYear, strategy.getAuthorshipCache(subSpeciesName));
|
|
165 | 165 |
|
166 | 166 |
subSpeciesName.setExCombinationAuthorTeam(exAuthor); |
167 |
assertEquals(authorString + " ex. " + exAuthorString + ", " + publicationYear , strategy.getAuthorCache(subSpeciesName)); |
|
167 |
assertEquals(authorString + " ex. " + exAuthorString + ", " + publicationYear , strategy.getAuthorshipCache(subSpeciesName));
|
|
168 | 168 |
|
169 | 169 |
subSpeciesName.setBasionymAuthorTeam(basAuthor); |
170 |
assertEquals("(" + basAuthorString + ")" + " " + authorString + " ex. " + exAuthorString + ", " + publicationYear , strategy.getAuthorCache(subSpeciesName)); |
|
170 |
assertEquals("(" + basAuthorString + ")" + " " + authorString + " ex. " + exAuthorString + ", " + publicationYear , strategy.getAuthorshipCache(subSpeciesName));
|
|
171 | 171 |
subSpeciesName.setOriginalPublicationYear(originalPublicationYear); |
172 |
assertEquals("(" + basAuthorString + ", " + originalPublicationYear + ")" + " " + authorString + " ex. " + exAuthorString + ", " + publicationYear , strategy.getAuthorCache(subSpeciesName)); |
|
172 |
assertEquals("(" + basAuthorString + ", " + originalPublicationYear + ")" + " " + authorString + " ex. " + exAuthorString + ", " + publicationYear , strategy.getAuthorshipCache(subSpeciesName));
|
|
173 | 173 |
|
174 | 174 |
subSpeciesName.setExBasionymAuthorTeam(exBasAuthor); |
175 |
assertEquals("(" + basAuthorString + " ex. " + exBasAuthorString + ", " + originalPublicationYear + ")" + " " + authorString + " ex. " + exAuthorString + ", " + publicationYear , strategy.getAuthorCache(subSpeciesName)); |
|
175 |
assertEquals("(" + basAuthorString + " ex. " + exBasAuthorString + ", " + originalPublicationYear + ")" + " " + authorString + " ex. " + exAuthorString + ", " + publicationYear , strategy.getAuthorshipCache(subSpeciesName));
|
|
176 | 176 |
|
177 |
assertNull(subSpeciesNameString, strategy.getAuthorCache(null)); |
|
177 |
assertNull(subSpeciesNameString, strategy.getAuthorshipCache(null));
|
|
178 | 178 |
} |
179 | 179 |
|
180 | 180 |
/** |
Also available in: Unified diff