JAL-2541 removed redundant test flag
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 18 Jan 2018 13:58:52 +0000 (13:58 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 18 Jan 2018 13:58:52 +0000 (13:58 +0000)
test/jalview/commands/EditCommandTest.java

index 9c91705..575aae5 100644 (file)
@@ -894,7 +894,6 @@ public class EditCommandTest
      * and validate the resulting remaining sequence features!
      */
     SequenceI[] sqs = new SequenceI[] { seq0 };
-    boolean checkDsSize = true;
 
     for (int from = 0; from < seq0.getLength(); from++)
     {
@@ -915,15 +914,13 @@ public class EditCommandTest
                 copySequenceFeatures,
                 copySeq0.getSequenceFeatures().toString());
 
-        if (checkDsSize)
-        {
-          /*
-           * verify a new dataset sequence has appeared
-           */
-          assertEquals("Wrong Dataset size after " + msg,
-                  newDatasetSequence ? 2 : 1, alignment.getDataset()
-                          .getHeight());
-        }
+        /*
+         * verify any new dataset sequence was added to the
+         * alignment dataset
+         */
+        assertEquals("Wrong Dataset size after " + msg,
+                newDatasetSequence ? 2 : 1,
+                alignment.getDataset().getHeight());
 
         /*
          * undo and verify all restored
@@ -936,19 +933,13 @@ public class EditCommandTest
 
         /*
          * verify copy alignment dataset sequence still unaffected
+         * and alignment dataset has shrunk (if it was added to)
          */
         assertEquals("Original dataset sequence was modified",
                 copySequenceFeatures,
                 copySeq0.getSequenceFeatures().toString());
-
-        if (checkDsSize)
-        {
-          /*
-           * verify dataset sequence has shrunk
-           */
-          assertEquals("Wrong Dataset size after Undo of " + msg, 1,
-                  alignment.getDataset().getHeight());
-        }
+        assertEquals("Wrong Dataset size after Undo of " + msg, 1,
+                alignment.getDataset().getHeight());
 
         /*
          * redo and verify
@@ -958,20 +949,14 @@ public class EditCommandTest
 
         /*
          * verify copy alignment dataset sequence unaffected
+         * and any new dataset sequence readded to alignment dataset
          */
         assertEquals("Original dataset sequence was modified",
                 copySequenceFeatures,
                 copySeq0.getSequenceFeatures().toString());
-
-        if (checkDsSize)
-        {
-          /*
-           * verify a new dataset sequence has appeared again
-           */
-          assertEquals("Wrong Dataset size after Redo of " + msg,
-                  newDatasetSequence ? 2 : 1, alignment.getDataset()
-                          .getHeight());
-        }
+        assertEquals("Wrong Dataset size after Redo of " + msg,
+                newDatasetSequence ? 2 : 1,
+                alignment.getDataset().getHeight());
 
         /*
          * undo ready for next cut
@@ -980,18 +965,13 @@ public class EditCommandTest
 
         /*
          * final verify that copy alignment dataset sequence is still unaffected
+         * and that alignment dataset has shrunk
          */
         assertEquals("Original dataset sequence was modified",
                 copySequenceFeatures,
                 copySeq0.getSequenceFeatures().toString());
-        if (checkDsSize)
-        {
-          /*
-           * and that dataset sequence has shrunk
-           */
-          assertEquals("Wrong Dataset size after final Undo of " + msg, 1,
-                  alignment.getDataset().getHeight());
-        }
+        assertEquals("Wrong Dataset size after final Undo of " + msg, 1,
+                alignment.getDataset().getHeight());
       }
     }
   }