1
|
/**
|
2
|
* Copyright (C) 2009 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
|
package eu.etaxonomy.cdm.model.name;
|
10
|
|
11
|
import org.apache.log4j.Logger;
|
12
|
import org.junit.Assert;
|
13
|
import org.junit.Before;
|
14
|
import org.junit.BeforeClass;
|
15
|
import org.junit.Test;
|
16
|
|
17
|
/**
|
18
|
* @author a.mueller
|
19
|
\* @since 03.01.2011
|
20
|
*
|
21
|
*/
|
22
|
public class ZoologicalNameTest {
|
23
|
@SuppressWarnings("unused")
|
24
|
private static final Logger logger = Logger.getLogger(ZoologicalNameTest.class);
|
25
|
|
26
|
private IZoologicalName zooName1;
|
27
|
|
28
|
/**
|
29
|
* @throws java.lang.Exception
|
30
|
*/
|
31
|
@BeforeClass
|
32
|
public static void setUpBeforeClass() throws Exception {
|
33
|
}
|
34
|
|
35
|
/**
|
36
|
* @throws java.lang.Exception
|
37
|
*/
|
38
|
@Before
|
39
|
public void setUp() throws Exception {
|
40
|
zooName1 = TaxonNameFactory.NewZoologicalInstance(Rank.SPECIES(), "Aus", null, "bus", "infracus", null, null, null, null);
|
41
|
}
|
42
|
|
43
|
//****************** TESTS ******************************************/
|
44
|
|
45
|
/**
|
46
|
* Test method for {@link eu.etaxonomy.cdm.model.name.ZoologicalName#clone()}.
|
47
|
*/
|
48
|
@Test
|
49
|
public void testClone() {
|
50
|
zooName1.setBreed("breed");
|
51
|
zooName1.setPublicationYear(1956);
|
52
|
zooName1.setOriginalPublicationYear(1867);
|
53
|
IZoologicalName clone = (IZoologicalName)zooName1.clone();
|
54
|
Assert.assertEquals("Breed should be equal", "breed", clone.getBreed());
|
55
|
Assert.assertEquals("Publication year should be equal", Integer.valueOf(1956), clone.getPublicationYear());
|
56
|
Assert.assertEquals("Original publication year should be equal", Integer.valueOf(1867), clone.getOriginalPublicationYear());
|
57
|
}
|
58
|
|
59
|
}
|