JAL-1805 test envirionment separation
[jalview.git] / test / jalview / ext / jmol / PDBFileWithJmolTest.java
index 79e3eae..301c70d 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
  */
 package jalview.ext.jmol;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+
+import jalview.bin.Cache;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.SequenceI;
@@ -31,7 +33,8 @@ import jalview.io.FileLoader;
 
 import java.util.Vector;
 
-import org.junit.Test;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
 
 import MCview.PDBfile;
 
@@ -47,7 +50,16 @@ public class PDBFileWithJmolTest
   // "./examples/DNMT1_MOUSE.pdb"
   // };
 
-  @Test
+  @BeforeMethod
+  public void setUp()
+  {
+    Cache.applicationProperties.setProperty("STRUCT_FROM_PDB",
+            Boolean.TRUE.toString());
+    Cache.applicationProperties.setProperty("ADD_SS_ANN",
+            Boolean.TRUE.toString());
+  }
+
+  @Test(groups ={ "Functional" })
   public void testAlignmentLoader() throws Exception
   {
     for (String f : testFile)
@@ -59,12 +71,12 @@ public class PDBFileWithJmolTest
     }
   }
 
-  @Test
+  @Test(groups ={ "Functional" })
   public void testFileParser() throws Exception
   {
     for (String pdbStr : testFile)
     {
-      PDBfile mctest = new PDBfile(false, false, pdbStr,
+      PDBfile mctest = new PDBfile(false, false, false, pdbStr,
               AppletFormatAdapter.FILE);
       PDBFileWithJmol jtest = new PDBFileWithJmol(pdbStr,
               jalview.io.AppletFormatAdapter.FILE);