Merge branch 'develop' into bug/JAL-2255_seq-fetcher-broken-on-linux
[jalview.git] / test / jalview / ws / jws2 / ParameterUtilsTest.java
index 1e02213..e859cb0 100644 (file)
@@ -25,6 +25,7 @@ import static org.testng.AssertJUnit.assertFalse;
 import static org.testng.AssertJUnit.assertTrue;
 
 import jalview.bin.Cache;
+import jalview.gui.JvOptionPane;
 import jalview.ws.jabaws.JalviewJabawsTestUtils;
 import jalview.ws.jws2.jabaws2.Jws2Instance;
 
@@ -41,8 +42,21 @@ import compbio.metadata.Preset;
 import compbio.metadata.PresetManager;
 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 ParameterUtilsTest
 {
+
+  @BeforeClass(alwaysRun = true)
+  public void setUpJvOptionPane()
+  {
+    JvOptionPane.setInteractiveMode(false);
+    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+  }
+
   /*
    * To limit tests to specify services, add them to this list; leave list empty
    * to test all
@@ -120,7 +134,7 @@ public class ParameterUtilsTest
             || serviceTests.contains(service.serviceType.toLowerCase());
   }
 
-  @Test(groups = { "Functional" })
+  @Test(groups = { "Network" })
   public void testCopyOption()
   {
     for (Jws2Instance service : disc.getServices())
@@ -144,7 +158,7 @@ public class ParameterUtilsTest
 
   /**
    */
-  @Test(groups = { "Functional" })
+  @Test(groups = { "Network" })
   public void testCopyParameter()
   {
     for (Jws2Instance service : disc.getServices())