{
// seem to need a dataset sequence on the edited sequence here
seqs[1].createDatasetSequence();
- new EditCommand("", Action.REPLACE, "ZXY", new SequenceI[] { seqs[1] },
+ assertEquals("fghjklmnopq", seqs[1].getSequenceAsString());
+ // NB command.number holds end position for a Replace command
+ new EditCommand("", Action.REPLACE, "Z-xY", new SequenceI[] { seqs[1] },
4, 8, al);
assertEquals("abcdefghjk", seqs[0].getSequenceAsString());
+ assertEquals("fghjZ-xYopq", seqs[1].getSequenceAsString());
+ assertEquals("fghjZxYopq",
+ seqs[1].getDatasetSequence().getSequenceAsString());
assertEquals("qrstuvwxyz", seqs[2].getSequenceAsString());
assertEquals("1234567890", seqs[3].getSequenceAsString());
}
* NB arg4 = start column of selection for edit (base 0)
* arg5 = column after end of selection for edit
*/
- EditCommand edit = new EditCommand("", Action.REPLACE, "XYZ",
+ EditCommand edit = new EditCommand("", Action.REPLACE, "xyZ",
new SequenceI[]
{ seq }, 2,
4, al);
- assertEquals("ABXYZ-DEF", seq.getSequenceAsString());
+ assertEquals("ABxyZ-DEF", seq.getSequenceAsString());
assertEquals(1, seq.getStart());
assertEquals(8, seq.getEnd());
- assertEquals("ABXYZDEF", seq.getDatasetSequence().getSequenceAsString());
+ assertEquals("ABxyZDEF",
+ seq.getDatasetSequence().getSequenceAsString());
assertEquals(8, seq.getDatasetSequence().getEnd());
/*
*/
edit.doCommand(views);
- assertEquals("ABXYZ-DEF", seq.getSequenceAsString());
+ assertEquals("ABxyZ-DEF", seq.getSequenceAsString());
assertEquals(1, seq.getStart());
assertEquals(8, seq.getEnd());
- assertEquals("ABXYZDEF",
+ assertEquals("ABxyZDEF",
seq.getDatasetSequence().getSequenceAsString());
assertEquals(8, seq.getDatasetSequence().getEnd());