testee = new EditCommand();
seqs = new SequenceI[4];
seqs[0] = new Sequence("seq0", "abcdefghjk");
- seqs[0].setDatasetSequence(new Sequence("seq0ds", "abcdefghjk"));
+ seqs[0].setDatasetSequence(new Sequence("seq0ds", "ABCDEFGHJK"));
seqs[1] = new Sequence("seq1", "fghjklmnopq");
- seqs[1].setDatasetSequence(new Sequence("seq1ds", "fghjklmnopq"));
+ seqs[1].setDatasetSequence(new Sequence("seq1ds", "FGHJKLMNOPQ"));
seqs[2] = new Sequence("seq2", "qrstuvwxyz");
- seqs[2].setDatasetSequence(new Sequence("seq2ds", "qrstuvwxyz"));
+ seqs[2].setDatasetSequence(new Sequence("seq2ds", "QRSTUVWXYZ"));
seqs[3] = new Sequence("seq3", "1234567890");
seqs[3].setDatasetSequence(new Sequence("seq3ds", "1234567890"));
al = new Alignment(seqs);
4, 8, al);
assertEquals("abcdefghjk", seqs[0].getSequenceAsString());
assertEquals("fghjZ-xYopq", seqs[1].getSequenceAsString());
- assertEquals("fghjZxYopq",
+ // Dataset Sequence should always be uppercase
+ assertEquals("fghjZxYopq".toUpperCase(),
seqs[1].getDatasetSequence().getSequenceAsString());
assertEquals("qrstuvwxyz", seqs[2].getSequenceAsString());
assertEquals("1234567890", seqs[3].getSequenceAsString());
assertEquals("ABxyZ-DEF", seq.getSequenceAsString());
assertEquals(1, seq.getStart());
assertEquals(8, seq.getEnd());
- assertEquals("ABxyZDEF",
+ // Dataset sequence always uppercase
+ assertEquals("ABxyZDEF".toUpperCase(),
seq.getDatasetSequence().getSequenceAsString());
assertEquals(8, seq.getDatasetSequence().getEnd());
assertEquals("ABxyZ-DEF", seq.getSequenceAsString());
assertEquals(1, seq.getStart());
assertEquals(8, seq.getEnd());
- assertEquals("ABxyZDEF",
+ // dataset sequence should be Uppercase
+ assertEquals("ABxyZDEF".toUpperCase(),
seq.getDatasetSequence().getSequenceAsString());
assertEquals(8, seq.getDatasetSequence().getEnd());
assertEquals("----klmnopq", seqs[1].getSequenceAsString());
// and ds is preserved
assertTrue(dsseq == seqs[1].getDatasetSequence());
- // and it is unchanged
- assertEquals("fghjklmnopq", dsseq.getSequenceAsString());
+ // and it is unchanged and UPPERCASE !
+ assertEquals("fghjklmnopq".toUpperCase(), dsseq.getSequenceAsString());
// and that alignment sequence start has been adjusted
assertEquals(5, seqs[1].getStart());
assertEquals(11, seqs[1].getEnd());
assertEquals("----klmnopq", seqs[1].getSequenceAsString());
// and ds is preserved
assertTrue(dsseq == seqs[1].getDatasetSequence());
- // and it is unchanged
- assertEquals("fghjklmnopq", dsseq.getSequenceAsString());
+ // and it is unchanged AND UPPERCASE !
+ assertEquals("fghjklmnopq".toUpperCase(), dsseq.getSequenceAsString());
// and that alignment sequence start has been adjusted
assertEquals(5, seqs[1].getStart());
assertEquals(11, seqs[1].getEnd());