Merge branch 'features/JAL-2326_JOptionPane-refactoring' into develop
[jalview.git] / test / jalview / bin / CommandLineOperations.java
index c79a043..69a3ef7 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.bin;
 
+import jalview.gui.JvOptionPane;
+
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.IOException;
@@ -28,12 +30,21 @@ import java.util.ArrayList;
 
 import org.testng.Assert;
 import org.testng.FileAssert;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
 public class CommandLineOperations
 {
+
+  @BeforeClass(alwaysRun = true)
+  public void setUpJvOptionPane()
+  {
+    JvOptionPane.setInteractiveMode(false);
+    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+  }
+
   private static final int TEST_TIMEOUT = 4500; // Note longer timeout needed on
                                                 // full test run than on
                                                 // individual tests