JAL-2507 JAL-2509 extend test to cover round trip of full range of WUSS RNA secondary...
[jalview.git] / test / jalview / analysis / RnaTest.java
index f96d2c9..814d2d4 100644 (file)
@@ -27,13 +27,23 @@ import static org.testng.AssertJUnit.assertTrue;
 import static org.testng.AssertJUnit.fail;
 
 import jalview.analysis.SecStrConsensus.SimpleBP;
+import jalview.gui.JvOptionPane;
 
 import java.util.Vector;
 
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 public class RnaTest
 {
+
+  @BeforeClass(alwaysRun = true)
+  public void setUpJvOptionPane()
+  {
+    JvOptionPane.setInteractiveMode(false);
+    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+  }
+
   @Test(groups = { "Functional" })
   public void testGetSimpleBPs() throws WUSSParseException
   {
@@ -105,7 +115,7 @@ public class RnaTest
     {
       String s = String.valueOf((char) i);
       String ss = Rna.getRNASecStrucState(s);
-  
+
       /*
        * valid SS chars are a-z, A-Z, and various brackets;
        * anything else is returned as a space
@@ -120,7 +130,7 @@ public class RnaTest
         assertEquals(" ", ss);
       }
     }
-  
+
     /*
      * a string is processed character by character
      */
@@ -278,7 +288,7 @@ public class RnaTest
   public void testIsRnaSecondaryStructureSymbol()
   {
     assertFalse(Rna.isRnaSecondaryStructureSymbol(null));
-  
+
     /*
      * only A-Z,  a-z, ()[]{}<> are valid symbols
      */