JAL-1853 test origin of gapChar bug in AlignView method
authorJim Procter <jprocter@issues.jalview.org>
Tue, 1 Sep 2015 16:10:01 +0000 (17:10 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 1 Sep 2015 16:10:01 +0000 (17:10 +0100)
test/jalview/datamodel/AlignmentViewTest.java [new file with mode: 0644]

diff --git a/test/jalview/datamodel/AlignmentViewTest.java b/test/jalview/datamodel/AlignmentViewTest.java
new file mode 100644 (file)
index 0000000..24fe067
--- /dev/null
@@ -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");
+  }
+}