Merge branch 'develop' into features/JAL-2094_colourInterface
[jalview.git] / test / jalview / ws / jabaws / DisorderAnnotExportImport.java
index e561479..9f62481 100644 (file)
  */
 package jalview.ws.jabaws;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
+
+import jalview.bin.Cache;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.io.AnnotationFile;
@@ -35,10 +36,12 @@ import jalview.ws.jws2.jabaws2.Jws2Instance;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
 
+@Test(groups = { "External" })
 public class DisorderAnnotExportImport
 {
   public static String testseqs = "examples/uniref50.fa";
@@ -51,11 +54,11 @@ public class DisorderAnnotExportImport
 
   public static jalview.gui.AlignFrame af = null;
 
-  @BeforeClass
+  @BeforeClass(inheritGroups = true)
   public static void setUpBeforeClass() throws Exception
   {
-
-    jalview.bin.Cache.initLogger();
+    Cache.loadProperties("test/jalview/io/testProps.jvprops");
+    Cache.initLogger();
     disc = JalviewJabawsTestUtils.getJabawsDiscoverer();
     iupreds = new ArrayList<Jws2Instance>();
     for (Jws2Instance svc : disc.getServices())
@@ -72,13 +75,14 @@ public class DisorderAnnotExportImport
     assertNotNull("Couldn't load test data ('" + testseqs + "')", af);
   }
 
-  @AfterClass
+  @AfterClass(alwaysRun = true)
   public static void tearDownAfterClass() throws Exception
   {
     if (af != null)
     {
       af.setVisible(false);
       af.dispose();
+      af = null;
     }
   }
 
@@ -157,7 +161,7 @@ public class DisorderAnnotExportImport
     {
       e.printStackTrace();
     }
-    fail("Test "
+    Assert.fail("Test "
             + testname
             + "\nCouldn't complete Annotation file roundtrip input/output/input test.");
   }