package jalview.datamodel;
import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertSame;
import jalview.util.MapList;
m = new Mapping(seq, fk);
assertEquals("[ [1, 6] [8, 13] ] 3:1 to [ [4, 7] ] Seq1", m.toString());
}
+
+ @Test(groups = { "Functional" })
+ public void testCopyConstructor()
+ {
+ MapList ml = new MapList(new int[] { 1, 6, 8, 13 }, new int[] { 4, 7 },
+ 3, 1);
+ SequenceI seq = new Sequence("seq1", "agtacg");
+ Mapping m = new Mapping(seq, ml);
+ m.setMappedFromId("abc");
+ Mapping copy = new Mapping(m);
+ assertEquals("abc", copy.getMappedFromId());
+ assertEquals(ml, copy.getMap());
+ assertSame(seq, copy.getTo());
+ }
}