Project

General

Profile

« Previous | Next » 

Revision cedc4ff1

Added by Katja Luther about 6 years ago

ref #2380: implement usage of Dto for taxon navigator

View differences:

eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.java
31 31
import eu.etaxonomy.cdm.model.description.TaxonDescription;
32 32
import eu.etaxonomy.cdm.model.name.TaxonName;
33 33
import eu.etaxonomy.cdm.model.taxon.Classification;
34
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
35 34
import eu.etaxonomy.cdm.model.taxon.Taxon;
36 35
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
36
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
37 37
import eu.etaxonomy.taxeditor.navigation.navigator.TreeNodeDropAdapter.MovingType;
38 38
import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingChangeAcceptedTaxonToSynonymOperation;
39 39
import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingDeleteTaxonNodeOperation;
......
147 147
        }
148 148
        Assert.assertTrue(taxonNode.getCountChildren() > 0);
149 149

  
150
        Set<ITaxonTreeNode> nodes = new HashSet<ITaxonTreeNode>();
151
        nodes.add(taxonNode);
150
        Set<TaxonNodeDto> nodes = new HashSet();
151
        nodes.add(new TaxonNodeDto(taxonNode));
152 152

  
153 153
        TaxonNodeDeletionConfigurator configNodes = new TaxonNodeDeletionConfigurator();
154 154
        configNodes.setChildHandling(ChildHandling.DELETE);
......
160 160
        operation = new RemotingDeleteTaxonNodeOperation(sessionOwner,
161 161
                false,
162 162
                nodes,
163
                null,
163 164
                config);
164 165
        operation.execute(monitor, info);
165 166
        TaxonNode reloadedNode = taxonNodeService.load(taxonNode.getUuid());
......
180 181
        TaxonNode taxonNode2 = taxonNodeService.load(taxonNode2Uuid);
181 182
        TaxonNode taxonNode3 = taxonNodeService.load(taxonNode3Uuid);
182 183

  
183
        Set<ITaxonTreeNode> nodes = new HashSet<ITaxonTreeNode>();
184
        nodes.add(taxonNode1);
185
        nodes.add(taxonNode2);
186
        nodes.add(taxonNode3);
184
        Set<TaxonNodeDto> nodes = new HashSet();
185
        nodes.add(new TaxonNodeDto(taxonNode1));
186
        nodes.add(new TaxonNodeDto(taxonNode2));
187
        nodes.add(new TaxonNodeDto(taxonNode3));
187 188

  
188 189
        TaxonDeletionConfigurator config = new TaxonDeletionConfigurator();
189 190

  
......
194 195
        operation = new RemotingDeleteTaxonNodeOperation(sessionOwner,
195 196
                false,
196 197
                nodes,
198
                null,
197 199
                config);
198 200
        operation.execute(monitor, info);
199 201
        TaxonNode reloadedNode1 = taxonNodeService.load(taxonNode1.getUuid());
......
217 219
        }
218 220
        Assert.assertTrue(taxonNode.getCountChildren() > 0);
219 221

  
220
        Set<ITaxonTreeNode> nodes = new HashSet<ITaxonTreeNode>();
221
        nodes.add(taxonNode);
222
        Set<TaxonNodeDto> nodes = new HashSet();
223
        nodes.add(new TaxonNodeDto(taxonNode));
222 224

  
223 225
        TaxonNodeDeletionConfigurator configNodes = new TaxonNodeDeletionConfigurator();
224 226
        configNodes.setChildHandling(ChildHandling.MOVE_TO_PARENT);
......
229 231
        operation = new RemotingDeleteTaxonNodeOperation(sessionOwner,
230 232
                false,
231 233
                nodes,
234
                null,
232 235
                config);
233 236
        operation.execute(monitor, info);
234 237
        TaxonNode reloadedNode = taxonNodeService.load(taxonNode.getUuid());
......
248 251
        UUID classificationUuid = UUID.fromString("0c2b5d25-7b15-4401-8b51-dd4be0ee5cab");
249 252
        Classification classification = classificationService.load(classificationUuid);
250 253
        TaxonNode rootNode = classification.getRootNode();
251
        Set<ITaxonTreeNode> nodes = new HashSet<ITaxonTreeNode>();
252
        nodes.add(classification);
254
        Set<TaxonNodeDto> nodes = new HashSet();
255
        nodes.add(new TaxonNodeDto(classification.getRootNode()));
253 256

  
254 257
        TaxonNodeDeletionConfigurator configNodes = new TaxonNodeDeletionConfigurator();
255 258
        configNodes.setChildHandling(ChildHandling.DELETE);
......
259 262
        operation = new RemotingDeleteTaxonNodeOperation(sessionOwner,
260 263
                false,
261 264
                nodes,
265
                null,
262 266
                config);
263 267
        operation.execute(monitor, info);
264 268

  

Also available in: Unified diff