Merge branch 'Jalview-JS/JAL-3253-applet' of https://source.jalview.org/git/jalview...
[jalview.git] / test / jalview / io / Jalview2xmlBase.java
index fbdd782..2af9559 100644 (file)
@@ -31,7 +31,7 @@ import java.util.Date;
 
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.BeforeMethod;
 
 public class Jalview2xmlBase
 {
@@ -54,6 +54,8 @@ public class Jalview2xmlBase
      */
     Cache.loadProperties("test/jalview/io/testProps.jvprops");
 
+    Cache.initLogger();
+
     /*
      * set news feed last read to a future time to ensure no
      * 'unread' news item is displayed
@@ -70,16 +72,16 @@ public class Jalview2xmlBase
   @AfterClass(alwaysRun = true)
   public static void tearDownAfterClass() throws Exception
   {
-    jalview.gui.Desktop.instance.closeAll_actionPerformed(null);
+    jalview.gui.Desktop.getInstance().closeAll_actionPerformed(null);
   }
 
-  @BeforeTest(alwaysRun = true)
+  @BeforeMethod(alwaysRun = true)
   public static void clearDesktop()
   {
-    if (Desktop.instance != null && Desktop.getFrames() != null
+    if (Desktop.getInstance() != null && Desktop.getFrames() != null
             && Desktop.getFrames().length > 0)
     {
-      Desktop.instance.closeAll_actionPerformed(null);
+      Desktop.getInstance().closeAll_actionPerformed(null);
     }
   }