Revision 4dbcb616
Added by Andreas Müller over 3 years ago
cdmlib-model/src/test/java/eu/etaxonomy/cdm/model/name/TypeDesignationBaseTest.java | ||
---|---|---|
9 | 9 |
package eu.etaxonomy.cdm.model.name; |
10 | 10 |
|
11 | 11 |
import org.junit.Assert; |
12 |
import org.junit.Before; |
|
13 | 12 |
import org.junit.Test; |
14 | 13 |
|
15 |
import eu.etaxonomy.cdm.model.common.Language; |
|
16 | 14 |
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit; |
17 | 15 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType; |
18 | 16 |
import eu.etaxonomy.cdm.model.reference.Reference; |
19 | 17 |
import eu.etaxonomy.cdm.model.reference.ReferenceFactory; |
20 |
import eu.etaxonomy.cdm.model.term.DefaultTermInitializer;
|
|
18 |
import eu.etaxonomy.cdm.test.unit.EntityTestBase;
|
|
21 | 19 |
|
22 | 20 |
/** |
23 | 21 |
* @author a.mueller |
24 | 22 |
* @since 18.04.2018 |
25 |
* |
|
26 | 23 |
*/ |
27 |
public class TypeDesignationBaseTest { |
|
24 |
public class TypeDesignationBaseTest extends EntityTestBase {
|
|
28 | 25 |
|
29 |
/** |
|
30 |
* @throws java.lang.Exception |
|
31 |
*/ |
|
32 |
@Before |
|
33 |
public void setUp() throws Exception { |
|
34 |
if (Language.DEFAULT() == null){ |
|
35 |
new DefaultTermInitializer().initialize(); |
|
36 |
} |
|
37 |
} |
|
38 |
|
|
39 |
/** |
|
40 |
* Test method for {@link TypeDesignationStatusBase#clone()}. |
|
41 |
*/ |
|
42 | 26 |
@SuppressWarnings("cast") |
43 | 27 |
@Test |
44 | 28 |
public void testClone(){ |
... | ... | |
62 | 46 |
Assert.assertNotNull(status); |
63 | 47 |
|
64 | 48 |
//clone |
65 |
SpecimenTypeDesignation clonedDesignation = (SpecimenTypeDesignation)originalDesignation.clone();
|
|
49 |
SpecimenTypeDesignation clonedDesignation = originalDesignation.clone(); |
|
66 | 50 |
|
67 | 51 |
//post assert |
68 | 52 |
Assert.assertEquals(2, name1.getTypeDesignations().size()); |
... | ... | |
74 | 58 |
|
75 | 59 |
Assert.assertSame(citation, clonedDesignation.getCitation()); |
76 | 60 |
Assert.assertSame(status, clonedDesignation.getTypeStatus()); |
77 |
|
|
78 | 61 |
} |
79 |
} |
|
62 |
} |
Also available in: Unified diff
cleanup and use TermTestBase for model tests