From da2128d3430fc1617555e6c2f2ea9c235a06d108 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 30 Jun 2017 15:06:50 +0100 Subject: [PATCH] JAL-2602 unit test added --- test/jalview/gui/AlignViewportTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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()); } } -- 1.7.10.2