Project

General

Profile

Download (1.71 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2009 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
package eu.etaxonomy.cdm.model.name;
11

    
12
import org.apache.log4j.Logger;
13
import org.junit.Assert;
14
import org.junit.Before;
15
import org.junit.BeforeClass;
16
import org.junit.Test;
17

    
18
/**
19
 * @author a.mueller
20
 * @date 03.01.2011
21
 *
22
 */
23
public class ZoologicalNameTest {
24
	@SuppressWarnings("unused")
25
	private static final Logger logger = Logger.getLogger(ZoologicalNameTest.class);
26
	
27
	private ZoologicalName zooName1;
28
	
29
	/**
30
	 * @throws java.lang.Exception
31
	 */
32
	@BeforeClass
33
	public static void setUpBeforeClass() throws Exception {
34
	}
35

    
36
	/**
37
	 * @throws java.lang.Exception
38
	 */
39
	@Before
40
	public void setUp() throws Exception {
41
		zooName1 = ZoologicalName.NewInstance(Rank.SPECIES(), "Aus", null, "bus", "infracus", null, null, null, null);
42
	}
43

    
44
//****************** TESTS ******************************************/
45
	
46
	/**
47
	 * Test method for {@link eu.etaxonomy.cdm.model.name.ZoologicalName#clone()}.
48
	 */
49
	@Test
50
	public void testClone() {
51
		zooName1.setBreed("breed");
52
		zooName1.setPublicationYear(1956);
53
		zooName1.setOriginalPublicationYear(1867);
54
		ZoologicalName clone = (ZoologicalName)zooName1.clone();
55
		Assert.assertEquals("Breed should be equal", "breed", clone.getBreed());
56
		Assert.assertEquals("Publication year should be equal", Integer.valueOf(1956), clone.getPublicationYear());
57
		Assert.assertEquals("Original publication year should be equal", Integer.valueOf(1867), clone.getOriginalPublicationYear());
58
	}
59

    
60
}
(13-13/13)