added cdm entitysession enabled objects to operations
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / test / java / eu / etaxonomy / taxeditor / editor / name / operation / DeleteDescriptionElementOperationTest.java
index 1dc962c6cec7e27282f6eb41471cf9e948b6d969..f5dd35aec3689082225d10e63d8e4eb8c728e9b1 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -32,7 +32,7 @@ public class DeleteDescriptionElementOperationTest extends AbstractTaxeditorOper
        private static DescriptionElementBase descriptionElement;
 
        private static TaxonDescription description;
-       
+
        /**
         * @throws java.lang.Exception
         */
@@ -40,48 +40,48 @@ public class DeleteDescriptionElementOperationTest extends AbstractTaxeditorOper
        public static void setUpBeforeClass() throws Exception {
                taxon = Taxon.NewInstance(null, null);
                descriptionElement = TextData.NewInstance();
-               
+
                description = TaxonDescription.NewInstance();
-               
+
                description.addElement(descriptionElement);
-               
+
                taxon.addDescription(description);
-               
-               
-               operation = new DeleteDescriptionElementOperation("", undoContext, descriptionElement, postOperation);
+
+
+               operation = new DeleteDescriptionElementOperation("", undoContext, descriptionElement, postOperation, cdmEntitySessionEnabled);
        }
 
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteDescriptionElementOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
                operation.execute(monitor, info);
-               
+
                Assert.assertTrue(taxon.getDescriptions().toArray(new TaxonDescription[0])[0].getElements().size() == 0);
        }
 
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteDescriptionElementOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
                operation.undo(monitor, info);
-               
+
                Assert.assertTrue(taxon.getDescriptions().toArray(new TaxonDescription[0])[0].getElements().size() > 0);
                Assert.assertEquals(descriptionElement, taxon.getDescriptions().toArray(new TaxonDescription[0])[0].getElements().toArray(new DescriptionElementBase[0])[0]);
        }
 
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteDescriptionElementOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
                operation.redo(monitor, info);
-               
+
                Assert.assertTrue(taxon.getDescriptions().toArray(new TaxonDescription[0])[0].getElements().size() == 0);
        }
 }