Revision 4dbcb616
Added by Andreas Müller over 3 years ago
cdmlib-model/src/test/java/eu/etaxonomy/cdm/model/description/TaxonInteractionTest.java | ||
---|---|---|
12 | 12 |
import static org.junit.Assert.assertNotEquals; |
13 | 13 |
|
14 | 14 |
import org.junit.Before; |
15 |
import org.junit.BeforeClass; |
|
16 | 15 |
import org.junit.Test; |
17 | 16 |
|
18 | 17 |
import eu.etaxonomy.cdm.model.common.Language; |
... | ... | |
20 | 19 |
import eu.etaxonomy.cdm.model.name.Rank; |
21 | 20 |
import eu.etaxonomy.cdm.model.name.TaxonNameFactory; |
22 | 21 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
23 |
import eu.etaxonomy.cdm.model.term.DefaultTermInitializer;
|
|
22 |
import eu.etaxonomy.cdm.test.unit.EntityTestBase;
|
|
24 | 23 |
|
25 | 24 |
/** |
26 | 25 |
* @author a.mueller |
27 | 26 |
* @since 23.04.2018 |
28 |
* |
|
29 | 27 |
*/ |
30 |
public class TaxonInteractionTest { |
|
31 |
|
|
28 |
public class TaxonInteractionTest extends EntityTestBase { |
|
32 | 29 |
|
33 | 30 |
private Taxon taxon; |
34 | 31 |
private TaxonInteraction taxonInteraction; |
35 | 32 |
|
36 |
/** |
|
37 |
* @throws java.lang.Exception |
|
38 |
*/ |
|
39 |
@BeforeClass |
|
40 |
public static void setUpBeforeClass() throws Exception { |
|
41 |
if (Language.DEFAULT() == null){ |
|
42 |
DefaultTermInitializer vocabularyStore = new DefaultTermInitializer(); |
|
43 |
vocabularyStore.initialize(); |
|
44 |
} |
|
45 |
} |
|
46 |
|
|
47 |
/** |
|
48 |
* @throws java.lang.Exception |
|
49 |
*/ |
|
50 | 33 |
@Before |
51 | 34 |
public void setUp() throws Exception { |
52 | 35 |
|
... | ... | |
58 | 41 |
taxonInteraction.putDescription(langString); |
59 | 42 |
} |
60 | 43 |
|
61 |
|
|
62 | 44 |
@Test |
63 | 45 |
public void testClone(){ |
64 |
TaxonInteraction clone = (TaxonInteraction)taxonInteraction.clone();
|
|
46 |
TaxonInteraction clone = taxonInteraction.clone(); |
|
65 | 47 |
assertNotEquals(clone.getDescription().get(Language.ENGLISH()), taxonInteraction.getDescription().get(Language.ENGLISH())); |
66 | 48 |
assertEquals(clone.getDescription(Language.ENGLISH()),taxonInteraction.getDescription(Language.ENGLISH())); |
67 | 49 |
} |
68 |
|
|
69 |
} |
|
50 |
} |
Also available in: Unified diff
cleanup and use TermTestBase for model tests