From: Jim Procter Date: Tue, 1 Sep 2015 16:10:01 +0000 (+0100) Subject: JAL-1853 test origin of gapChar bug in AlignView method X-Git-Tag: Release_2_10_0~514^2~3^2~4 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c5cf27bd5db2fc477c1483c1037f21375c9d0a04;p=jalview.git JAL-1853 test origin of gapChar bug in AlignView method --- diff --git a/test/jalview/datamodel/AlignmentViewTest.java b/test/jalview/datamodel/AlignmentViewTest.java new file mode 100644 index 0000000..24fe067 --- /dev/null +++ b/test/jalview/datamodel/AlignmentViewTest.java @@ -0,0 +1,21 @@ +package jalview.datamodel; +import static org.testng.Assert.assertEquals; + +import org.testng.annotations.Test; + +public class AlignmentViewTest +{ + @Test + public void testGetVisibleAlignmentGapChar() + { + SeqCigar ss = new SeqCigar(new Sequence("One", "A..CDE")); + CigarArray ca = new CigarArray(new CigarSimple[] { ss }); + AlignmentView av = new AlignmentView(ca); + String dots = av.getSequenceStrings('.')[0]; + assertEquals(dots, "A..CDE"); + String dollars = av.getSequenceStrings('$')[0]; + assertEquals(dollars, "A$$CDE"); + assertEquals(av.getVisibleAlignment('$').getSequenceAt(0) + .getSequenceAsString(), "A$$CDE"); + } +}