JAL-2326 added setup method for JvOptionPane in all Jalveiw test classes to enable...
[jalview.git] / test / jalview / ws / rest / RestClientTest.java
index 12556b3..7a9419a 100644 (file)
@@ -23,13 +23,23 @@ package jalview.ws.rest;
 import static org.testng.AssertJUnit.assertEquals;
 
 import jalview.bin.Cache;
+import jalview.gui.JvOptionPane;
 
 import java.util.Vector;
 
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 public class RestClientTest
 {
+
+  @BeforeClass(alwaysRun = true)
+  public void setUpJvOptionPane()
+  {
+    JvOptionPane.setInteractiveMode(false);
+    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+  }
+
   /**
    * Refactored 'as is' from main method
    */