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
|
|
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
|
import eu.etaxonomy.cdm.model.name.CultivarPlantName;
|
19
|
import eu.etaxonomy.cdm.model.name.Rank;
|
20
|
|
21
|
/**
|
22
|
* @author a.mueller
|
23
|
* @date 03.01.2011
|
24
|
*
|
25
|
*/
|
26
|
public class CultivarPlantNameTest {
|
27
|
@SuppressWarnings("unused")
|
28
|
private static final Logger logger = Logger.getLogger(CultivarPlantName.class);
|
29
|
|
30
|
private static CultivarPlantName name1;
|
31
|
|
32
|
|
33
|
/**
|
34
|
* @throws java.lang.Exception
|
35
|
*/
|
36
|
@BeforeClass
|
37
|
public static void setUpBeforeClass() throws Exception {
|
38
|
}
|
39
|
|
40
|
/**
|
41
|
* @throws java.lang.Exception
|
42
|
*/
|
43
|
@Before
|
44
|
public void setUp() throws Exception {
|
45
|
name1 = CultivarPlantName.NewInstance(Rank.SPECIES());
|
46
|
name1.setGenusOrUninomial("Aus");
|
47
|
name1.setSpecificEpithet("bus");
|
48
|
name1.setCultivarName("cultivarus");
|
49
|
}
|
50
|
|
51
|
// ******************* TESTS *************************************/
|
52
|
|
53
|
@Test
|
54
|
public void testClone(){
|
55
|
CultivarPlantName clone = (CultivarPlantName)name1.clone();
|
56
|
Assert.assertEquals("Cultivar string should be equal", "cultivarus", clone.getCultivarName());
|
57
|
// Assert.assertNotSame("Cultivar string should be not same (but equal)", name1.getCultivarName(), clone.getCultivarName());
|
58
|
}
|
59
|
|
60
|
|
61
|
}
|