1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.cdm.model.name;
|
11
|
|
12
|
|
13
|
import static org.junit.Assert.assertEquals;
|
14
|
import static org.junit.Assert.assertNotNull;
|
15
|
import static org.junit.Assert.assertTrue;
|
16
|
|
17
|
import org.apache.log4j.Logger;
|
18
|
import org.junit.Before;
|
19
|
import org.junit.BeforeClass;
|
20
|
import org.junit.Test;
|
21
|
|
22
|
import eu.etaxonomy.cdm.model.common.DefaultTermInitializer;
|
23
|
|
24
|
/**
|
25
|
* @author a.babadshanjan
|
26
|
* @created 19.05.2009
|
27
|
* @version 1.0
|
28
|
*/
|
29
|
public class NameTypeDesignationTest {
|
30
|
@SuppressWarnings("unused")
|
31
|
private static final Logger logger = Logger
|
32
|
.getLogger(NameTypeDesignationTest.class);
|
33
|
|
34
|
private NameTypeDesignation term1 = null;
|
35
|
private NameTypeDesignation term2 = null;
|
36
|
|
37
|
@BeforeClass
|
38
|
public static void setUpBeforeClass() {
|
39
|
DefaultTermInitializer vocabularyStore = new DefaultTermInitializer();
|
40
|
vocabularyStore.initialize();
|
41
|
}
|
42
|
|
43
|
@Before
|
44
|
public void setUp() {
|
45
|
term1 = new NameTypeDesignation();
|
46
|
term2 = new NameTypeDesignation(new ZoologicalName(), null, null, null, null, true, false, false);
|
47
|
}
|
48
|
|
49
|
@Test
|
50
|
public void testNameTypeDesignation() {
|
51
|
assertNotNull(term1);
|
52
|
assertNotNull(term2);
|
53
|
}
|
54
|
|
55
|
@Test
|
56
|
public void testGetTypeStatus() {
|
57
|
term1.setTypeStatus(NameTypeDesignationStatus.TAUTONYMY());
|
58
|
assertEquals(term1.getTypeStatus(), NameTypeDesignationStatus.TAUTONYMY());
|
59
|
assertTrue(term1.getTypeStatus().isInstanceOf(NameTypeDesignationStatus.class));
|
60
|
}
|
61
|
}
|