JAL-2314 Re-annotated unit tests using Jws2Discoverer
[jalview.git] / test / jalview / ws / jabaws / RNAStructExportImport.java
index dc8d0e4..6cd32c7 100644 (file)
@@ -27,6 +27,7 @@ import jalview.bin.Cache;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.gui.Jalview2XML;
+import jalview.gui.JvOptionPane;
 import jalview.io.AnnotationFile;
 import jalview.io.DataSourceType;
 import jalview.io.FileFormat;
@@ -54,8 +55,21 @@ import org.testng.annotations.Test;
 import compbio.metadata.Argument;
 import compbio.metadata.WrongParameterException;
 
+/*
+ * All methods in this class are set to the Network group because setUpBeforeClass will fail
+ * if there is no network.
+ */
+@Test(singleThreaded = true)
 public class RNAStructExportImport
 {
+
+  @BeforeClass(alwaysRun = true)
+  public void setUpJvOptionPane()
+  {
+    JvOptionPane.setInteractiveMode(false);
+    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+  }
+
   private static final String JAR_FILE_NAME = "testRnalifold_param.jar";
 
   public static String testseqs = "examples/RF00031_folded.stk";
@@ -130,7 +144,7 @@ public class RNAStructExportImport
     }
   }
 
-  @Test(groups = { "Functional" })
+  @Test(groups = { "Network" })
   public void testRNAAliFoldValidStructure()
   {
 
@@ -163,7 +177,7 @@ public class RNAStructExportImport
     }
   }
 
-  @Test(groups = { "Functional" })
+  @Test(groups = { "Network" })
   public void testRNAStructExport()
   {
 
@@ -192,7 +206,7 @@ public class RNAStructExportImport
     try
     {
       // what format would be appropriate for RNAalifold annotations?
-      String aligfileout = FileFormat.Pfam.getAlignmentFile().print(
+      String aligfileout = FileFormat.Pfam.getWriter(null).print(
               al.getSequencesArray(), true);
 
       String anfileout = new AnnotationFile()
@@ -233,7 +247,7 @@ public class RNAStructExportImport
             + "\nCouldn't complete Annotation file roundtrip input/output/input test.");
   }
 
-  @Test(groups = { "Functional" })
+  @Test(groups = { "Network" })
   public void testRnaalifoldSettingsRecovery()
   {
     List<Argument> opts = new ArrayList<Argument>();