From: gmungoc Date: Fri, 30 Jun 2017 14:06:50 +0000 (+0100) Subject: JAL-2602 unit test added X-Git-Tag: Release_2_10_3b1~181^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=da2128d3430fc1617555e6c2f2ea9c235a06d108;p=jalview.git JAL-2602 unit test added --- diff --git a/test/jalview/gui/AlignViewportTest.java b/test/jalview/gui/AlignViewportTest.java index 4660842..346d74dd 100644 --- a/test/jalview/gui/AlignViewportTest.java +++ b/test/jalview/gui/AlignViewportTest.java @@ -450,6 +450,23 @@ public class AlignViewportTest } ; Assert.assertEquals(c, 1, "Expected to find one occupancy row."); + } + @Test(groups = { "Functional" }) + public void testGetConsensusSeq() + { + /* + * A-C + * A-C + * A-D + * --D + * consensus expected to be A-C + */ + String fasta = ">s1\nA-C\n>s2\nA-C\n>s3\nA-D\n>s4\n--D\n"; + AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(fasta, + DataSourceType.PASTE); + AlignViewport testme = af.getViewport(); + SequenceI cons = testme.getConsensusSeq(); + assertEquals("A-C", cons.getSequenceAsString()); } }