Revision 4dbcb616
Added by Andreas Müller about 3 years ago
cdmlib-model/src/test/java/eu/etaxonomy/cdm/model/name/BotanicalNameTest.java | ||
---|---|---|
19 | 19 |
import org.apache.log4j.Logger; |
20 | 20 |
import org.junit.Assert; |
21 | 21 |
import org.junit.Before; |
22 |
import org.junit.BeforeClass; |
|
23 | 22 |
import org.junit.Test; |
24 | 23 |
import org.springframework.beans.BeanUtils; |
25 | 24 |
|
... | ... | |
27 | 26 |
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase; |
28 | 27 |
import eu.etaxonomy.cdm.model.reference.Reference; |
29 | 28 |
import eu.etaxonomy.cdm.model.reference.ReferenceFactory; |
30 |
import eu.etaxonomy.cdm.model.term.DefaultTermInitializer; |
|
31 | 29 |
import eu.etaxonomy.cdm.test.unit.EntityTestBase; |
32 | 30 |
|
33 | 31 |
|
... | ... | |
37 | 35 |
private TaxonName botanicalName1; |
38 | 36 |
private IBotanicalName botanicalName2; |
39 | 37 |
|
40 |
@BeforeClass |
|
41 |
public static void setUpBeforeClass() { |
|
42 |
DefaultTermInitializer vocabularyStore = new DefaultTermInitializer(); |
|
43 |
vocabularyStore.initialize(); |
|
44 |
} |
|
45 |
|
|
46 | 38 |
@Before |
47 | 39 |
public void setUp() throws Exception { |
48 | 40 |
botanicalName1 = TaxonNameFactory.NewBotanicalInstance(null); |
... | ... | |
161 | 153 |
botanicalName1.setGenusOrUninomial("Aus"); |
162 | 154 |
botanicalName1.setRank(Rank.GENUS()); |
163 | 155 |
botanicalName1.setAnamorphic(true); |
164 |
TaxonName clone = (TaxonName)botanicalName1.clone();
|
|
156 |
TaxonName clone = botanicalName1.clone(); |
|
165 | 157 |
Assert.assertEquals("Anamorphic should be equal", true, clone.isAnamorphic()); |
166 | 158 |
botanicalName1.setAnamorphic(false); |
167 |
clone = (TaxonName)botanicalName1.clone();
|
|
159 |
clone = botanicalName1.clone(); |
|
168 | 160 |
Assert.assertEquals("Anamorphic should be equal", false, clone.isAnamorphic()); |
169 | 161 |
} |
170 | 162 |
|
Also available in: Unified diff
cleanup and use TermTestBase for model tests