Merge branch 'develop' into bug/JAL-2255_seq-fetcher-broken-on-linux
[jalview.git] / test / jalview / io / PfamFormatInputTest.java
index 0eaf94b..52a13f6 100644 (file)
 package jalview.io;
 
 import jalview.datamodel.AlignmentI;
+import jalview.gui.JvOptionPane;
 
 import java.io.IOException;
 
 import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 public class PfamFormatInputTest
 {
-  @Test
+
+  @BeforeClass(alwaysRun = true)
+  public void setUpJvOptionPane()
+  {
+    JvOptionPane.setInteractiveMode(false);
+    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+  }
+
+  @Test(groups = "Functional")
   public void testPfamFormatNoLimits() throws IOException
   {
-    AlignmentI al = new jalview.io.AppletFormatAdapter().readFile("ASEQ"
-            + '\t' + "...--FFAFAFF--", AppletFormatAdapter.PASTE, "PFAM");
+    AlignmentI al = new AppletFormatAdapter().readFile("ASEQ"
+            + '\t' + "...--FFAFAFF--", DataSourceType.PASTE,
+            FileFormat.Pfam);
     Assert.assertEquals(1, al.getHeight(), "Wrong number of sequences");
     Assert.assertTrue(al.hasValidSequence(),
             "Didn't extract limits from PFAM ID");
   }
 
-  @Test
+  @Test(groups = "Functional")
   public void testPfamFormatValidLimits() throws IOException
   {
-    AlignmentI al = new jalview.io.AppletFormatAdapter().readFile(
-            "ASEQ/15-25" + '\t' + "...--FFAFAFF--",
-            AppletFormatAdapter.PASTE, "PFAM");
+    AlignmentI al = new AppletFormatAdapter().readFile("ASEQ/15-25" + '\t'
+            + "...--FFAFAFF--", DataSourceType.PASTE, FileFormat.Pfam);
     Assert.assertEquals(1, al.getHeight(), "Wrong number of sequences");
     Assert.assertTrue(al.hasValidSequence(),
             "Didn't extract limits from PFAM ID");