assertEquals("[[1, 6], [11, 13], [15, 20]]", result);
}
+ @Test(groups = { "Functional" })
+ public void testToString()
+ {
+ /*
+ * with no sequence
+ */
+ MapList fk = new MapList(new int[] { 1, 6, 8, 13 }, new int[] { 4, 7 },
+ 3, 1);
+ Mapping m = new Mapping(fk);
+ assertEquals("[ [1, 6] [8, 13] ] To [ [4, 7] ] ", m.toString());
+
+ /*
+ * with a sequence
+ */
+ SequenceI seq = new Sequence("Seq1", "");
+ m = new Mapping(seq, fk);
+ assertEquals("[ [1, 6] [8, 13] ] To [ [4, 7] ] Seq1", m.toString());
+ }
}