adapt tests
[taxeditor.git] / eu.etaxonomy.taxeditor.navigation / src / test / java / eu / etaxonomy / taxeditor / navigation / navigator / operation / MoveTaxonOperationTest.java
index c0eeb7c6d2cabe3ef2daab6f99745ca5bf6163fb..3b3bc732e88013b40cd26dac1a18efb58529dbd0 100644 (file)
@@ -23,6 +23,7 @@ import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.navigation.navigator.e4.TreeNodeDropAdapterE4.MovingType;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
 import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
 
 /**
@@ -38,6 +39,8 @@ public class MoveTaxonOperationTest extends AbstractTaxeditorOperationTestBase {
        private static TaxonNode newParentTaxonNode;
        private static TaxonNode taxonNode;
 
+       static RemotingCdmUpdateOperation navigatorOperation;
+
        /**
         * @throws java.lang.Exception
         */
@@ -60,7 +63,7 @@ public class MoveTaxonOperationTest extends AbstractTaxeditorOperationTestBase {
                //TODO ??
                IConversationEnabled conversationEnabled = null;
                taxonNodeUuidSet.add(taxonNode.getUuid());
-               operation = new RemotingMoveTaxonOperation(null, true, taxonNodeUuidSet, newParentTaxonNode.getUuid(),  MovingType.CHILD);
+               navigatorOperation = new RemotingMoveTaxonOperation(null, true, taxonNodeUuidSet, newParentTaxonNode.getUuid(),  MovingType.CHILD);
        }
 
        /**
@@ -69,7 +72,7 @@ public class MoveTaxonOperationTest extends AbstractTaxeditorOperationTestBase {
         */
        @Test
        public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
-               operation.execute(monitor, info);
+           navigatorOperation.execute(monitor, info);
 
                Assert.assertEquals(newParentTaxon ,taxon.getTaxonNodes().iterator().next().getParent().getTaxon());
                Assert.assertEquals(taxon, newParentTaxon.getTaxonNodes().iterator().next().getChildNodes().iterator().next());
@@ -83,7 +86,7 @@ public class MoveTaxonOperationTest extends AbstractTaxeditorOperationTestBase {
         */
        @Test
        public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
-               operation.undo(monitor, info);
+           navigatorOperation.undo(monitor, info);
 
                Assert.assertEquals(oldParentTaxon ,taxon.getTaxonNodes().iterator().next().getParent().getTaxon());
                Assert.assertEquals(0, newParentTaxon.getTaxonNodes().iterator().next().getChildNodes().size());
@@ -96,7 +99,7 @@ public class MoveTaxonOperationTest extends AbstractTaxeditorOperationTestBase {
         */
        @Test
        public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
-               operation.redo(monitor, info);
+           navigatorOperation.redo(monitor, info);
 
                Assert.assertEquals(newParentTaxon ,taxon.getTaxonNodes().iterator().next().getParent().getTaxon());
                Assert.assertEquals(taxon, newParentTaxon.getTaxonNodes().iterator().next().getChildNodes().iterator().next());