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