From c5cf27bd5db2fc477c1483c1037f21375c9d0a04 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 1 Sep 2015 17:10:01 +0100 Subject: [PATCH] JAL-1853 test origin of gapChar bug in AlignView method --- test/jalview/datamodel/AlignmentViewTest.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/jalview/datamodel/AlignmentViewTest.java 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"); + } +} -- 1.7.10.2