X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fgui%2FJvSwingUtilsTest.java;h=61c5c9b9b42ff08414436a6210a688d57be7c4a5;hb=55ea4d59b2f4ce51f8310047dd1f8898697dde0c;hp=f1358d82a69e47d3f1b9328d48685969240f6669;hpb=8f118c154e74caaef6bec19acd0466904ac424d4;p=jalview.git diff --git a/test/jalview/gui/JvSwingUtilsTest.java b/test/jalview/gui/JvSwingUtilsTest.java index f1358d8..61c5c9b 100644 --- a/test/jalview/gui/JvSwingUtilsTest.java +++ b/test/jalview/gui/JvSwingUtilsTest.java @@ -25,11 +25,19 @@ import static org.testng.AssertJUnit.assertFalse; import javax.swing.JScrollBar; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class JvSwingUtilsTest { + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + @Test(groups = { "Functional" }) public void testGetScrollBarProportion() { @@ -105,8 +113,8 @@ public class JvSwingUtilsTest public void testWrapTooltip_longText() { String tip = "Now is the winter of our discontent made glorious summer by this sun of York"; - String expected = "

" - + tip + "

"; + String expected = "" + + "
" + tip + "
"; assertEquals("" + expected + "", JvSwingUtils.wrapTooltip(true, tip)); assertEquals(expected, JvSwingUtils.wrapTooltip(false, tip));