Revision 06a2de9b
Added by Andreas Müller over 4 years ago
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.java | ||
---|---|---|
44 | 44 |
/** |
45 | 45 |
* @author cmathew |
46 | 46 |
* @date 9 Mar 2015 |
47 |
* |
|
48 | 47 |
*/ |
49 | 48 |
@DataSet |
50 | 49 |
public class TaxonNavigatorTest extends BaseOperationTest { |
... | ... | |
59 | 58 |
Language english = Language.getLanguageFromUuid(Language.uuidEnglish); |
60 | 59 |
|
61 | 60 |
|
62 |
|
|
63 | 61 |
@Test |
64 | 62 |
public void testChangeAcceptedTaxonToSynonym() throws ExecutionException { |
65 | 63 |
|
66 |
|
|
67 | 64 |
UUID oldTaxonNodeNodeUuid = UUID.fromString("b85b5b78-6760-409f-ac91-bb89e95ff2a1"); |
68 | 65 |
UUID newAcceptedTaxonNodeUuid = UUID.fromString("6ad8e9e2-f5f6-41ad-aa30-f62a903650db"); |
69 | 66 |
|
... | ... | |
124 | 121 |
UUID targetTaxonUuid = UUID.fromString("b8402dc4-5050-4882-a147-01b71e0e47d6"); |
125 | 122 |
|
126 | 123 |
Taxon sourceTaxon = CdmBase.deproxy(taxonService.load(sourceTaxonUuid), Taxon.class); |
127 |
Set<TaxonDescription> sourceDescriptions = new HashSet(sourceTaxon.getDescriptions()); |
|
124 |
Set<TaxonDescription> sourceDescriptions = new HashSet<>(sourceTaxon.getDescriptions());
|
|
128 | 125 |
sessionOwner.addExpectedUpdatedObject(sourceTaxon); |
129 | 126 |
|
130 | 127 |
Taxon targetTaxon = CdmBase.deproxy(taxonService.load(targetTaxonUuid), Taxon.class); |
... | ... | |
152 | 149 |
} |
153 | 150 |
Assert.assertTrue(taxonNode.getCountChildren() > 0); |
154 | 151 |
|
155 |
Set<TaxonNodeDto> nodes = new HashSet(); |
|
152 |
Set<TaxonNodeDto> nodes = new HashSet<>();
|
|
156 | 153 |
nodes.add(new TaxonNodeDto(taxonNode)); |
157 | 154 |
|
158 | 155 |
TaxonNodeDeletionConfigurator configNodes = new TaxonNodeDeletionConfigurator(); |
... | ... | |
186 | 183 |
TaxonNode taxonNode2 = taxonNodeService.load(taxonNode2Uuid); |
187 | 184 |
TaxonNode taxonNode3 = taxonNodeService.load(taxonNode3Uuid); |
188 | 185 |
|
189 |
Set<TaxonNodeDto> nodes = new HashSet(); |
|
186 |
Set<TaxonNodeDto> nodes = new HashSet<>();
|
|
190 | 187 |
nodes.add(new TaxonNodeDto(taxonNode1)); |
191 | 188 |
nodes.add(new TaxonNodeDto(taxonNode2)); |
192 | 189 |
nodes.add(new TaxonNodeDto(taxonNode3)); |
... | ... | |
224 | 221 |
} |
225 | 222 |
Assert.assertTrue(taxonNode.getCountChildren() > 0); |
226 | 223 |
|
227 |
Set<TaxonNodeDto> nodes = new HashSet(); |
|
224 |
Set<TaxonNodeDto> nodes = new HashSet<>();
|
|
228 | 225 |
nodes.add(new TaxonNodeDto(taxonNode)); |
229 | 226 |
|
230 | 227 |
TaxonNodeDeletionConfigurator configNodes = new TaxonNodeDeletionConfigurator(); |
... | ... | |
256 | 253 |
UUID classificationUuid = UUID.fromString("0c2b5d25-7b15-4401-8b51-dd4be0ee5cab"); |
257 | 254 |
Classification classification = classificationService.load(classificationUuid); |
258 | 255 |
TaxonNode rootNode = classification.getRootNode(); |
259 |
Set<TaxonNodeDto> nodes = new HashSet(); |
|
256 |
Set<TaxonNodeDto> nodes = new HashSet<>();
|
|
260 | 257 |
nodes.add(new TaxonNodeDto(classification.getRootNode())); |
261 | 258 |
|
262 | 259 |
TaxonNodeDeletionConfigurator configNodes = new TaxonNodeDeletionConfigurator(); |
Also available in: Unified diff
cleanup