Revision 85f62f44
Added by Katja Luther about 6 years ago
eu.etaxonomy.taxeditor.navigation/src/test/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/MoveTaxonOperationTest.java | ||
---|---|---|
23 | 23 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
24 | 24 |
import eu.etaxonomy.cdm.model.taxon.TaxonNode; |
25 | 25 |
import eu.etaxonomy.taxeditor.navigation.navigator.e4.TreeNodeDropAdapterE4.MovingType; |
26 |
import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation; |
|
26 | 27 |
import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase; |
27 | 28 |
|
28 | 29 |
/** |
... | ... | |
38 | 39 |
private static TaxonNode newParentTaxonNode; |
39 | 40 |
private static TaxonNode taxonNode; |
40 | 41 |
|
42 |
static RemotingCdmUpdateOperation navigatorOperation; |
|
43 |
|
|
41 | 44 |
/** |
42 | 45 |
* @throws java.lang.Exception |
43 | 46 |
*/ |
... | ... | |
60 | 63 |
//TODO ?? |
61 | 64 |
IConversationEnabled conversationEnabled = null; |
62 | 65 |
taxonNodeUuidSet.add(taxonNode.getUuid()); |
63 |
operation = new RemotingMoveTaxonOperation(null, true, taxonNodeUuidSet, newParentTaxonNode.getUuid(), MovingType.CHILD);
|
|
66 |
navigatorOperation = new RemotingMoveTaxonOperation(null, true, taxonNodeUuidSet, newParentTaxonNode.getUuid(), MovingType.CHILD);
|
|
64 | 67 |
} |
65 | 68 |
|
66 | 69 |
/** |
... | ... | |
69 | 72 |
*/ |
70 | 73 |
@Test |
71 | 74 |
public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException { |
72 |
operation.execute(monitor, info);
|
|
75 |
navigatorOperation.execute(monitor, info);
|
|
73 | 76 |
|
74 | 77 |
Assert.assertEquals(newParentTaxon ,taxon.getTaxonNodes().iterator().next().getParent().getTaxon()); |
75 | 78 |
Assert.assertEquals(taxon, newParentTaxon.getTaxonNodes().iterator().next().getChildNodes().iterator().next()); |
... | ... | |
83 | 86 |
*/ |
84 | 87 |
@Test |
85 | 88 |
public void testUndoIProgressMonitorIAdaptable() throws ExecutionException { |
86 |
operation.undo(monitor, info);
|
|
89 |
navigatorOperation.undo(monitor, info);
|
|
87 | 90 |
|
88 | 91 |
Assert.assertEquals(oldParentTaxon ,taxon.getTaxonNodes().iterator().next().getParent().getTaxon()); |
89 | 92 |
Assert.assertEquals(0, newParentTaxon.getTaxonNodes().iterator().next().getChildNodes().size()); |
... | ... | |
96 | 99 |
*/ |
97 | 100 |
@Test |
98 | 101 |
public void testRedoIProgressMonitorIAdaptable() throws ExecutionException { |
99 |
operation.redo(monitor, info);
|
|
102 |
navigatorOperation.redo(monitor, info);
|
|
100 | 103 |
|
101 | 104 |
Assert.assertEquals(newParentTaxon ,taxon.getTaxonNodes().iterator().next().getParent().getTaxon()); |
102 | 105 |
Assert.assertEquals(taxon, newParentTaxon.getTaxonNodes().iterator().next().getChildNodes().iterator().next()); |
Also available in: Unified diff
adapt tests