X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fgui%2FAlignFrameTest.java;fp=test%2Fjalview%2Fgui%2FAlignFrameTest.java;h=3fe56b74610b7ef5df85df12916f3613cbd2473f;hb=6a05eb3f55d97e685f0c723822384633d5636778;hp=60a94c42bd548a315b2229a07bd5db98c4779514;hpb=d113749a183a3ea8f3f7e22c725511f59f1d833f;p=jalview.git diff --git a/test/jalview/gui/AlignFrameTest.java b/test/jalview/gui/AlignFrameTest.java index 60a94c4..3fe56b7 100644 --- a/test/jalview/gui/AlignFrameTest.java +++ b/test/jalview/gui/AlignFrameTest.java @@ -62,7 +62,53 @@ public class AlignFrameTest AlignFrame af; @BeforeClass(alwaysRun = true) - public void setUpJvOptionPane() + public static void setUpBeforeClass() throws Exception + { + setUpJvOptionPane(); + /* + * use read-only test properties file + */ + Cache.loadProperties("test/jalview/io/testProps.jvprops"); + Jalview.main(new String[] { "-nonews" }); + } + + @AfterMethod(alwaysRun = true) + public void tearDown() + { + Desktop.instance.closeAll_actionPerformed(null); + } + + /** + * configure (read-only) properties for test to ensure Consensus is computed for + * colour Above PID testing + */ + @BeforeMethod(alwaysRun = true) + public void setUp() + { + Cache.loadProperties("test/jalview/io/testProps.jvprops"); + Cache.applicationProperties.setProperty("SHOW_IDENTITY", + Boolean.TRUE.toString()); + af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa", + DataSourceType.FILE); + + /* + * wait for Consensus thread to complete + */ + synchronized (this) + { + while (af.getViewport().getConsensusSeq() == null) + { + try + { + wait(50); + } catch (InterruptedException e) + { + } + } + } + } + + public static void setUpJvOptionPane() { JvOptionPane.setInteractiveMode(false); JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); @@ -183,53 +229,6 @@ public class AlignFrameTest assertFalse(regions.hasNext()); } - @BeforeClass(alwaysRun = true) - public static void setUpBeforeClass() throws Exception - { - /* - * use read-only test properties file - */ - Jalview.main( - new String[] - { "-nonews", "-props", "test/jalview/io/testProps.jvprops" }); - } - - @AfterMethod(alwaysRun = true) - public void tearDown() - { - Desktop.instance.closeAll_actionPerformed(null); - } - - /** - * configure (read-only) properties for test to ensure Consensus is computed - * for colour Above PID testing - */ - @BeforeMethod(alwaysRun = true) - public void setUp() - { - Cache.loadProperties("test/jalview/io/testProps.jvprops"); - Cache.applicationProperties.setProperty("SHOW_IDENTITY", - Boolean.TRUE.toString()); - af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa", - DataSourceType.FILE); - - /* - * wait for Consensus thread to complete - */ - synchronized (this) - { - while (af.getViewport().getConsensusSeq() == null) - { - try - { - wait(50); - } catch (InterruptedException e) - { - } - } - } - } - /** * Test that changing background (alignment) colour scheme *