assertEquals(1, peptideMappings.size());
assertSame(pep3.getDatasetSequence(), peptideMappings.get(0).getTo());
}
+
+ @Test(groups = { "Functional" })
+ public void testIsMappable()
+ {
+ SequenceI dna1 = new Sequence("dna1", "cgCAGtgGT");
+ SequenceI aa1 = new Sequence("aa1", "RSG");
+ AlignmentI al1 = new Alignment(new SequenceI[] { dna1 });
+ AlignmentI al2 = new Alignment(new SequenceI[] { aa1 });
+
+ assertFalse(AlignmentUtils.isMappable(null, null));
+ assertFalse(AlignmentUtils.isMappable(al1, null));
+ assertFalse(AlignmentUtils.isMappable(null, al1));
+ assertFalse(AlignmentUtils.isMappable(al1, al1));
+ assertFalse(AlignmentUtils.isMappable(al2, al2));
+
+ assertTrue(AlignmentUtils.isMappable(al1, al2));
+ assertTrue(AlignmentUtils.isMappable(al2, al1));
+ }
}