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.Test;
|
15
|
|
16
|
/**
|
17
|
* @author a.mueller
|
18
|
* @since 03.01.2011
|
19
|
*/
|
20
|
public class CultivarPlantNameTest {
|
21
|
|
22
|
@SuppressWarnings("unused")
|
23
|
private static final Logger logger = Logger.getLogger(CultivarPlantNameTest.class);
|
24
|
|
25
|
private static ICultivarPlantName name1;
|
26
|
|
27
|
@Before
|
28
|
public void setUp() throws Exception {
|
29
|
name1 = TaxonNameFactory.NewCultivarInstance(Rank.SPECIES());
|
30
|
name1.setGenusOrUninomial("Aus");
|
31
|
name1.setSpecificEpithet("bus");
|
32
|
name1.setCultivarEpithet("cultivarus");
|
33
|
name1.setCultivarGroupEpithet("Cult Group");
|
34
|
}
|
35
|
|
36
|
// ******************* TESTS *************************************/
|
37
|
|
38
|
@Test
|
39
|
public void testClone(){
|
40
|
ICultivarPlantName clone = name1.clone();
|
41
|
Assert.assertEquals("Cultivar string should be equal", "cultivarus", clone.getCultivarEpithet());
|
42
|
Assert.assertEquals("Group string should be equal", "Cult Group", clone.getCultivarGroupEpithet());
|
43
|
Assert.assertSame("Cultivar string should even be same as String is unmutable", name1.getCultivarEpithet(), clone.getCultivarEpithet());
|
44
|
}
|
45
|
}
|