Merge branch 'develop' into feature/JAL-3187linkedFeatures
[jalview.git] / test / jalview / gui / AlignFrameTest.java
index 11a5f43..d2284f1 100644 (file)
@@ -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);
@@ -151,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
    * <ul>