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