X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Futil%2FQuickSortTest.java;h=f09dee95df66618141e48329a5867f56548edeca;hb=a718393f87a8396c8e7733f579d955126c707f4e;hp=54e46a01d8eb15b257ac9d21a2fed6083aa0863a;hpb=d616b0e1ac213a82591cece50ea25c5bfbfa865f;p=jalview.git diff --git a/test/jalview/util/QuickSortTest.java b/test/jalview/util/QuickSortTest.java index 54e46a0..f09dee9 100644 --- a/test/jalview/util/QuickSortTest.java +++ b/test/jalview/util/QuickSortTest.java @@ -23,13 +23,24 @@ package jalview.util; import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertTrue; +import jalview.gui.JvOptionPane; + import java.util.Arrays; import java.util.Random; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class QuickSortTest { + + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + private static final String c1 = "Blue"; private static final String c2 = "Yellow"; @@ -110,8 +121,7 @@ public class QuickSortTest "ALISON" }; QuickSort.sort(values, things); assertTrue(Arrays.equals(new String[] { "lucy", "henry", "henry", - "JOHN", - "ALISON" }, values)); + "JOHN", "ALISON" }, values)); assertTrue(Arrays.equals(new Object[] { c3, c2, c4, c1, c5 }, things)); }