Revision 2720ea2c
Added by Andreas Müller over 3 years ago
cdmlib-model/src/test/java/eu/etaxonomy/cdm/model/molecular/MolecularTest.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2009 EDIT |
3 |
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy |
|
4 | 4 |
* http://www.e-taxonomy.eu |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
... | ... | |
35 | 35 |
private PhylogeneticTree phyloTree; |
36 | 36 |
private Sequence seq; |
37 | 37 |
|
38 |
|
|
39 | 38 |
@BeforeClass |
40 | 39 |
public static void setUpBeforeClass() { |
41 | 40 |
DefaultTermInitializer vocabularyStore = new DefaultTermInitializer(); |
42 | 41 |
vocabularyStore.initialize(); |
43 | 42 |
} |
44 | 43 |
|
45 |
/** |
|
46 |
* @throws java.lang.Exception |
|
47 |
*/ |
|
48 | 44 |
@Before |
49 | 45 |
public void setUp() throws Exception { |
50 | 46 |
dnaSample = DnaSample.NewInstance(); |
... | ... | |
77 | 73 |
@Test |
78 | 74 |
public void testClone() throws URISyntaxException{ |
79 | 75 |
|
80 |
|
|
81 |
PhylogeneticTree phyloTreeClone = (PhylogeneticTree)phyloTree.clone(); |
|
76 |
PhylogeneticTree phyloTreeClone = phyloTree.clone(); |
|
82 | 77 |
assertTrue(phyloTreeClone.getUsedSequences().size() == 2); |
83 | 78 |
|
84 | 79 |
assertNotSame(phyloTreeClone.getUsedSequences().iterator().next(), phyloTree.getUsedSequences().iterator().next()); |
85 | 80 |
|
86 |
|
|
87 |
Sequence sequenceClone = (Sequence)seq.clone(); |
|
81 |
Sequence sequenceClone = seq.clone(); |
|
88 | 82 |
// assertEquals(sequenceClone.getChromatograms().iterator().next().getAllTitles().get(0),seq.getChromatograms().iterator().next().getAllTitles().get(0)); |
89 | 83 |
// |
90 | 84 |
// Iterator<Media> mediaIteratorClone = sequenceClone.getChromatograms().iterator(); |
... | ... | |
95 | 89 |
// LanguageString titleClone = test.getTitle(Language.ENGLISH()); |
96 | 90 |
// assertEquals(title, titleClone); |
97 | 91 |
|
98 |
|
|
99 | 92 |
assertTrue (sequenceClone.getGeneticAccessionNumber().equals(seq.getGeneticAccessionNumber())); |
100 | 93 |
assertNotNull(sequenceClone.getGenBankUri()); |
101 | 94 |
assertTrue (sequenceClone.getGenBankUri().equals(seq.getGenBankUri())); |
... | ... | |
117 | 110 |
} else { |
118 | 111 |
testBool = false; |
119 | 112 |
} |
120 |
|
|
121 | 113 |
} |
122 | 114 |
} |
123 | 115 |
assertTrue(testBool); |
124 |
|
|
125 |
|
|
126 |
|
|
127 |
|
|
128 | 116 |
} |
129 |
|
|
130 |
} |
|
117 |
} |
Also available in: Unified diff
cleanup