JAL-4036 removing the query field code from the dropdown indexes
[jalview.git] / test / jalview / bin / JalviewLiteTest.java
index 79310a0..e70cd89 100644 (file)
@@ -1,6 +1,6 @@
 /*******************************************************************************
- * Jalview - A Sequence Alignment Editor and Viewer (2.9.0b1)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -23,13 +23,23 @@ package jalview.bin;
 import static org.testng.AssertJUnit.assertEquals;
 import static org.testng.AssertJUnit.assertNull;
 
+import jalview.gui.JvOptionPane;
+
 import java.util.Arrays;
 
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 public class JalviewLiteTest
 {
 
+  @BeforeClass(alwaysRun = true)
+  public void setUpJvOptionPane()
+  {
+    JvOptionPane.setInteractiveMode(false);
+    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+  }
+
   @Test(groups = "Functional")
   public void testSeparatorListToArray()
   {
@@ -46,8 +56,8 @@ public class JalviewLiteTest
 
     assertEquals("[abc]",
             Arrays.toString(JalviewLite.separatorListToArray("abc|", "|")));
-    assertEquals("[abc]", Arrays.toString(JalviewLite.separatorListToArray(
-            "abcxy", "xy")));
+    assertEquals("[abc]", Arrays
+            .toString(JalviewLite.separatorListToArray("abcxy", "xy")));
 
     // these fail:
     // assertEquals("[abc]",