JAL-3490 match count independent of contiguous matches count
[jalview.git] / test / jalview / datamodel / DBRefEntryTest.java
index 7b1ab57..c8f998b 100644 (file)
@@ -25,13 +25,22 @@ import static org.testng.AssertJUnit.assertFalse;
 import static org.testng.AssertJUnit.assertSame;
 import static org.testng.AssertJUnit.assertTrue;
 
+import jalview.gui.JvOptionPane;
 import jalview.util.MapList;
 
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 public class DBRefEntryTest
 {
 
+  @BeforeClass(alwaysRun = true)
+  public void setUpJvOptionPane()
+  {
+    JvOptionPane.setInteractiveMode(false);
+    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+  }
+
   /**
    * Tests for the method that compares equality of reference (but not mapping)
    */
@@ -81,7 +90,7 @@ public class DBRefEntryTest
     assertTrue(ref1.updateFrom(ref2));
     assertEquals("UNIPROT", ref1.getSource()); // unchanged
     assertEquals("V71633", ref1.getAccessionId()); // unchanged
-  
+
     /*
      * ref1 has no mapping, acquires mapping from ref2
      */