JAL-3691 automatic insertion of Locale.ROOT to toUpperCase() and toLowerCase() and...
[jalview.git] / test / jalview / ws / gui / Jws2ParamView.java
index 1cf1e5f..2318971 100644 (file)
  */
 package jalview.ws.gui;
 
+import java.util.Locale;
+
 import jalview.bin.Cache;
+import jalview.gui.JvOptionPane;
 import jalview.gui.WsJobParameters;
 import jalview.util.MessageManager;
 import jalview.ws.jabaws.JalviewJabawsTestUtils;
@@ -46,6 +49,14 @@ import compbio.metadata.PresetManager;
 
 public class Jws2ParamView
 {
+
+  @BeforeClass(alwaysRun = true)
+  public void setUpJvOptionPane()
+  {
+    JvOptionPane.setInteractiveMode(false);
+    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+  }
+
   /**
    * which services to test
    */
@@ -57,7 +68,7 @@ public class Jws2ParamView
   public static List<String> presetTests = new ArrayList<String>();
   static
   {
-    serviceTests.add("AAConWS".toLowerCase());
+    serviceTests.add("AAConWS".toLowerCase(Locale.ROOT));
   }
 
   public static Jws2Discoverer disc = null;
@@ -65,6 +76,7 @@ public class Jws2ParamView
   @BeforeClass(alwaysRun = true)
   public static void setUpBeforeClass() throws Exception
   {
+    Cache.loadProperties("test/jalview/io/testProps.jvprops");
     Cache.initLogger();
     disc = JalviewJabawsTestUtils.getJabawsDiscoverer();
   }
@@ -81,7 +93,7 @@ public class Jws2ParamView
     for (Jws2Instance service : disc.getServices())
     {
       if (serviceTests.size() == 0
-              || serviceTests.contains(service.serviceType.toLowerCase()))
+              || serviceTests.contains(service.serviceType.toLowerCase(Locale.ROOT)))
       {
         List<Preset> prl = null;
         Preset pr = null;
@@ -139,6 +151,7 @@ public class Jws2ParamView
            */
           jf.addWindowListener(new WindowAdapter()
           {
+            @Override
             public void windowClosing(WindowEvent e)
             {
               thr.interrupt();