JAL-1782 JAL-1780 JAL-653 JAL-1892 update patched refactored test suite with TestNG
[jalview.git] / test / jalview / ws / jabaws / RNAStructExportImport.java
index 1475b4e..5d9773a 100644 (file)
@@ -20,9 +20,9 @@
  */
 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.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.gui.Jalview2XML;
@@ -42,10 +42,10 @@ import java.util.List;
 import javax.swing.JMenu;
 import javax.swing.JMenuItem;
 
-import org.junit.AfterClass;
-import org.junit.Assert;
-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;
 
 import compbio.metadata.WrongParameterException;
 
@@ -81,7 +81,7 @@ public class RNAStructExportImport
 
     if (rnaalifoldws == null)
     {
-      fail("no web service");
+      Assert.fail("no web service");
     }
 
     jalview.io.FileLoader fl = new jalview.io.FileLoader(false);
@@ -144,7 +144,9 @@ public class RNAStructExportImport
       {
         if (aa.isRNA())
         {
-          Assert.assertTrue("Did not create valid structure from RNAALiFold prediction", aa.isValidStruc());
+          assertTrue(
+                  "Did not create valid structure from RNAALiFold prediction",
+                  aa.isValidStruc());
         }
       }
     }
@@ -216,7 +218,7 @@ public class RNAStructExportImport
     {
       e.printStackTrace();
     }
-    fail("Test "
+    Assert.fail("Test "
             + testname
             + "\nCouldn't complete Annotation file roundtrip input/output/input test.");
   }
@@ -235,7 +237,7 @@ public class RNAStructExportImport
           rg.setValue("292");
         } catch (WrongParameterException q)
         {
-          fail("Couldn't set the temperature parameter "
+          Assert.fail("Couldn't set the temperature parameter "
                   + q.getStackTrace());
         }
         opts.add(rg);