* and validate the resulting remaining sequence features!
*/
SequenceI[] sqs = new SequenceI[] { seq0 };
- boolean checkDsSize = true;
for (int from = 0; from < seq0.getLength(); from++)
{
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
/*
* 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
/*
* 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
/*
* 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());
}
}
}