JAL-2446 merged to spike branch
[jalview.git] / test / jalview / ext / jmol / JmolViewerTest.java
index 1100000..792f7ad 100644 (file)
@@ -24,8 +24,10 @@ import static org.testng.AssertJUnit.assertTrue;
 
 import jalview.api.structures.JalviewStructureDisplayI;
 import jalview.bin.Cache;
+import jalview.bin.Jalview;
 import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
+import jalview.gui.JvOptionPane;
 import jalview.gui.Preferences;
 import jalview.gui.StructureViewer;
 import jalview.gui.StructureViewer.ViewerType;
@@ -39,14 +41,20 @@ import org.testng.annotations.Test;
 public class JmolViewerTest
 {
 
+  @BeforeClass(alwaysRun = true)
+  public void setUpJvOptionPane()
+  {
+    JvOptionPane.setInteractiveMode(false);
+    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+  }
+
   /**
    * @throws java.lang.Exception
    */
   @BeforeClass(alwaysRun = true)
   public static void setUpBeforeClass() throws Exception
   {
-    jalview.bin.Jalview.main(new String[] {
-        "-noquestionnaire -nonews -props",
+    Jalview.main(new String[] { "-noquestionnaire", "-nonews", "-props",
         "test/jalview/ext/rbvi/chimera/testProps.jvprops" });
   }
 
@@ -107,4 +115,6 @@ public class JmolViewerTest
       }
     }
   }
+
+
 }