X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fgui%2FPaintRefresherTest.java;h=5167eb3954fab24971babcc597f5c53be00018d7;hb=2b8c0785318a3528e1876e8e2dd48b7d831eae69;hp=52eadcb8fbb07f0e08b609ba679d479d7d133c37;hpb=8f118c154e74caaef6bec19acd0466904ac424d4;p=jalview.git diff --git a/test/jalview/gui/PaintRefresherTest.java b/test/jalview/gui/PaintRefresherTest.java index 52eadcb..5167eb3 100644 --- a/test/jalview/gui/PaintRefresherTest.java +++ b/test/jalview/gui/PaintRefresherTest.java @@ -36,11 +36,20 @@ import java.util.Map; import javax.swing.JPanel; import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; public class PaintRefresherTest { + + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + // TODO would prefer PaintRefresher to be a single rather than static @BeforeMethod(alwaysRun = true) public void setUp() @@ -48,7 +57,7 @@ public class PaintRefresherTest PaintRefresher.components.clear(); } - @AfterMethod + @AfterMethod(alwaysRun = true) public void tearDown() { PaintRefresher.components.clear();