X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fext%2Fandroid%2FSparseIntArrayTest.java;h=9dc7dfba1a0d54a3ff9f591fec93105714d48193;hb=refs%2Fheads%2Fbug%2FJAL-4313-make-visible-annot-fix;hp=be95d6ebcbe7b42869e28886dea803f3431f5b7d;hpb=5776cb3b3d74f3c3d3d791d56287d8d78e46b01b;p=jalview.git diff --git a/test/jalview/ext/android/SparseIntArrayTest.java b/test/jalview/ext/android/SparseIntArrayTest.java index be95d6e..9dc7dfb 100644 --- a/test/jalview/ext/android/SparseIntArrayTest.java +++ b/test/jalview/ext/android/SparseIntArrayTest.java @@ -23,6 +23,9 @@ package jalview.ext.android; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; +import jalview.gui.JvOptionPane; + +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; /* @@ -31,6 +34,14 @@ import org.testng.annotations.Test; */ public class SparseIntArrayTest { + + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + @Test(groups = "Functional") public void testPut() { @@ -49,7 +60,7 @@ public class SparseIntArrayTest public void testAdd() { SparseIntArray counter = new SparseIntArray(); - + assertEquals(counter.add('P', 2), 2); assertEquals(counter.add('P', 3), 5); counter.put('Q', 7); @@ -64,7 +75,7 @@ public class SparseIntArrayTest { // expected } - + counter.put('y', Integer.MIN_VALUE); try {