JAL-1270 JUnit to TestNG refactoring
[jalview.git] / test / jalview / io / AnnotatedPDBFileInputTest.java
index 6a61d2c..576201a 100644 (file)
@@ -1,17 +1,18 @@
 package jalview.io;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.io.File;
 
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
 
+import jalview.bin.Cache;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.PDBEntry;
@@ -31,9 +32,13 @@ public class AnnotatedPDBFileInputTest
 
   String pdbId;
 
-  @Before
+  @BeforeMethod
   public void setup() throws Exception
   {
+    Cache.applicationProperties.setProperty("STRUCT_FROM_PDB",
+            Boolean.TRUE.toString());
+    Cache.applicationProperties.setProperty("ADD_SS_ANN",
+            Boolean.TRUE.toString());
     FileLoader loader = new FileLoader(false);
     AlignFrame af = loader.LoadFileWaitTillLoaded(pdbStr,
             FormatAdapter.FILE);
@@ -55,7 +60,7 @@ public class AnnotatedPDBFileInputTest
     {
       for (int q = p + 1; q < avec.length; q++)
       {
-        assertNotEquals(
+        Assert.assertNotEquals(
                 "Found a duplicate annotation row " + avec[p].label,
                 avec[p], avec[q]);
       }