X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fgui%2FPaintRefresherTest.java;h=92cc0268a54c67b8df43d6fb104b0ec050768d83;hb=57738a1f3c19b1c3a00bd3ac5108f8cd0af32f99;hp=30d7a29ce9212cc4ab90ac61880df66157184c32;hpb=db93a1adcbe0a4eaaf06e0a70ade0d6c5c1961c3;p=jalview.git diff --git a/test/jalview/gui/PaintRefresherTest.java b/test/jalview/gui/PaintRefresherTest.java index 30d7a29..92cc026 100644 --- a/test/jalview/gui/PaintRefresherTest.java +++ b/test/jalview/gui/PaintRefresherTest.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) - * Copyright (C) 2015 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -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() @@ -126,8 +135,8 @@ public class PaintRefresherTest AlignmentViewport av = new AlignViewport(al); AlignFrame af = new AlignFrame(al, 4, 1); AlignmentPanel ap1 = af.alignPanel; - AlignmentPanel[] panels = PaintRefresher.getAssociatedPanels(av - .getSequenceSetId()); + AlignmentPanel[] panels = PaintRefresher + .getAssociatedPanels(av.getSequenceSetId()); assertEquals(1, panels.length); assertSame(ap1, panels[0]);