From: gmungoc Date: Mon, 17 Aug 2015 15:23:29 +0000 (+0100) Subject: JAL-1270 testIsMappable added X-Git-Tag: Release_2_10_0~535^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4ef482878202c8767c6780cc5bd081c83bc01a2b;p=jalview.git JAL-1270 testIsMappable added --- diff --git a/test/jalview/analysis/AlignmentUtilsTests.java b/test/jalview/analysis/AlignmentUtilsTests.java index 61b2487..6fef829 100644 --- a/test/jalview/analysis/AlignmentUtilsTests.java +++ b/test/jalview/analysis/AlignmentUtilsTests.java @@ -1267,4 +1267,22 @@ public class AlignmentUtilsTests 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)); + } }