X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Futil%2FMapListTest.java;h=a2f38e2269ebc0c239cb5ca89db0ea70165db1d2;hb=5f4e1e4c330b045e9c8bce28ee132a0fca3834d8;hp=ba298c5a8643fad76d9627ac0a2a5d96a0eb3e36;hpb=cbdd0bde03d210649623b4576dd75e6c25fe4582;p=jalview.git diff --git a/test/jalview/util/MapListTest.java b/test/jalview/util/MapListTest.java index ba298c5..a2f38e2 100644 --- a/test/jalview/util/MapListTest.java +++ b/test/jalview/util/MapListTest.java @@ -27,15 +27,25 @@ import static org.testng.AssertJUnit.assertSame; import static org.testng.AssertJUnit.assertTrue; import static org.testng.internal.junit.ArrayAsserts.assertArrayEquals; +import jalview.gui.JvOptionPane; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class MapListTest { + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + @Test(groups = { "Functional" }) public void testSomething() { @@ -535,8 +545,7 @@ public class MapListTest MapList ml = new MapList(new int[] { 1, 5, 10, 15, 25, 20 }, new int[] { 51, 1 }, 1, 3); String s = ml.toString(); - assertEquals("[ [1, 5] [10, 15] [25, 20] ] 1:3 to [ [51, 1] ]", - s); + assertEquals("[ [1, 5] [10, 15] [25, 20] ] 1:3 to [ [51, 1] ]", s); } @Test(groups = { "Functional" }) @@ -671,8 +680,8 @@ public class MapListTest public void testIsFromForwardStrand() { // [3-9] declares forward strand - MapList ml = new MapList(new int[] { 2, 2, 3, 9, 12, 11 }, - new int[] { 20, 11 }, 1, 1); + MapList ml = new MapList(new int[] { 2, 2, 3, 9, 12, 11 }, new int[] { + 20, 11 }, 1, 1); assertTrue(ml.isFromForwardStrand()); // [11-5] declares reverse strand ([13-14] is ignored)