1 |
a42e27ce
|
Andreas Müller
|
/**
|
2 |
|
|
* Copyright (C) 2009 EDIT
|
3 |
18b50091
|
Andreas Müller
|
* European Distributed Institute of Taxonomy
|
4 |
a42e27ce
|
Andreas Müller
|
* http://www.e-taxonomy.eu
|
5 |
18b50091
|
Andreas Müller
|
*
|
6 |
a42e27ce
|
Andreas Müller
|
* 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 |
53db84af
|
Andreas Müller
|
* @since 03.01.2011
|
20 |
a42e27ce
|
Andreas Müller
|
*
|
21 |
|
|
*/
|
22 |
|
|
public class ZoologicalNameTest {
|
23 |
|
|
@SuppressWarnings("unused")
|
24 |
|
|
private static final Logger logger = Logger.getLogger(ZoologicalNameTest.class);
|
25 |
18b50091
|
Andreas Müller
|
|
26 |
d7919b1c
|
Andreas Müller
|
private IZoologicalName zooName1;
|
27 |
18b50091
|
Andreas Müller
|
|
28 |
a42e27ce
|
Andreas Müller
|
/**
|
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 |
033fa0b2
|
Andreas Müller
|
zooName1 = TaxonNameFactory.NewZoologicalInstance(Rank.SPECIES(), "Aus", null, "bus", "infracus", null, null, null, null);
|
41 |
a42e27ce
|
Andreas Müller
|
}
|
42 |
|
|
|
43 |
|
|
//****************** TESTS ******************************************/
|
44 |
18b50091
|
Andreas Müller
|
|
45 |
a42e27ce
|
Andreas Müller
|
/**
|
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 |
d7919b1c
|
Andreas Müller
|
IZoologicalName clone = (IZoologicalName)zooName1.clone();
|
54 |
a42e27ce
|
Andreas Müller
|
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 |
|
|
}
|