Merge branch 'Jalview-JS/JAL-3253-applet' of https://source.jalview.org/git/jalview...
[jalview.git] / test / jalview / io / Jalview2xmlBase.java
index 38481e5..2af9559 100644 (file)
@@ -21,7 +21,6 @@
 package jalview.io;
 
 import jalview.bin.Cache;
-import jalview.bin.Instance;
 import jalview.bin.Jalview;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.SequenceI;
@@ -32,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
 {
@@ -55,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
@@ -71,16 +72,16 @@ public class Jalview2xmlBase
   @AfterClass(alwaysRun = true)
   public static void tearDownAfterClass() throws Exception
   {
-    jalview.bin.Instance.getDesktop().closeAll_actionPerformed(null);
+    jalview.gui.Desktop.getInstance().closeAll_actionPerformed(null);
   }
 
-  @BeforeTest(alwaysRun = true)
+  @BeforeMethod(alwaysRun = true)
   public static void clearDesktop()
   {
-    if (Instance.getDesktop() != null && Desktop.getFrames() != null
+    if (Desktop.getInstance() != null && Desktop.getFrames() != null
             && Desktop.getFrames().length > 0)
     {
-      Instance.getDesktop().closeAll_actionPerformed(null);
+      Desktop.getInstance().closeAll_actionPerformed(null);
     }
   }