X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fgui%2FAlignFrameTest.java;h=d2284f12593ae4b63b14ee0c15a26c6bcde552e6;hb=f2511dd2e8e37b8e999e924f8a53d150377b21b5;hp=afb61d09c444e5cacc178cfebd54512b8cbe5e84;hpb=e42eed3a0089a8a064560df4cf17a5021fd1e16a;p=jalview.git diff --git a/test/jalview/gui/AlignFrameTest.java b/test/jalview/gui/AlignFrameTest.java index afb61d0..d2284f1 100644 --- a/test/jalview/gui/AlignFrameTest.java +++ b/test/jalview/gui/AlignFrameTest.java @@ -20,6 +20,7 @@ */ package jalview.gui; +import static org.junit.Assert.assertNotEquals; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotSame; @@ -38,7 +39,7 @@ import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import jalview.io.DataSourceType; import jalview.io.FileLoader; -import jalview.io.Jalview2xmlTests; +import jalview.project.Jalview2xmlTests; import jalview.renderer.ResidueShaderI; import jalview.schemes.BuriedColourScheme; import jalview.schemes.FeatureColour; @@ -61,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); @@ -150,52 +197,6 @@ public class AlignFrameTest assertEquals(next[1], 8); } - @BeforeClass(alwaysRun = true) - public static void setUpBeforeClass() throws Exception - { - /* - * 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) - { - } - } - } - } - /** * Test that changing background (alignment) colour scheme *