JAL-2507 JAL-2509 extend test to cover round trip of full range of WUSS RNA secondary...
authorJim Procter <jprocter@issues.jalview.org>
Tue, 9 May 2017 16:57:20 +0000 (17:57 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 9 May 2017 16:57:46 +0000 (17:57 +0100)
test/jalview/io/StockholmFileTest.java

index 185eedf..bd1400b 100644 (file)
@@ -37,6 +37,7 @@ import java.util.BitSet;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
@@ -443,9 +444,26 @@ public class StockholmFileTest
           + "(|(|(|(|, .|, .|, .|, .|)|)|)|)|\t0.0\nROWPROPERTIES\t"
           + "secondary structure\tscaletofit=true\tshowalllabs=true\tcentrelabs=false";
 
+  String annFileFullWuss = "JALVIEW_ANNOTATION\n# Created: Thu May 04 11:16:52 BST 2017\n\n"
+          + "SEQUENCE_REF\tDm\nNO_GRAPH\tsecondary structure\tsecondary structure\t"
+          + "(|(|(|(||{|{||[|[||)|)|)|)||}|}|]|]\t0.0\nROWPROPERTIES\t"
+          + "secondary structure\tscaletofit=true\tshowalllabs=true\tcentrelabs=false";
+
   @Test(groups = { "Functional" })
   public void secondaryStructureForRNASequence() throws Exception
   {
+    roundTripSSForRNA(aliFile, annFile);
+  }
+
+  @Test(groups = { "Functional" })
+  public void fullWUSSsecondaryStructureForRNASequence() throws Exception
+  {
+    roundTripSSForRNA(aliFile, annFileFullWuss);
+  }
+
+  private static void roundTripSSForRNA(String aliFile, String annFile)
+          throws Exception
+  {
     AlignmentI al = new AppletFormatAdapter().readFile(aliFile,
             DataSourceType.PASTE, jalview.io.FileFormat.Fasta);
     AnnotationFile aaf = new AnnotationFile();