JAL-1645 Version-Rel Version 2.9 Year-Rel 2015 Licensing glob
[jalview.git] / test / jalview / ext / jmol / PDBFileWithJmolTest.java
index c0643c5..fa3922b 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 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;
 
@@ -41,13 +44,22 @@ import MCview.PDBfile;
  */
 public class PDBFileWithJmolTest
 {
-  String[] testFile = new String[]
-  { "./examples/1GAQ.txt", "./test/jalview/ext/jmol/1QCF.pdb" }; // ,
+  String[] testFile = new String[] { "./examples/1GAQ.txt",
+      "./test/jalview/ext/jmol/1QCF.pdb" }; // ,
 
   // "./examples/DNMT1_MOUSE.pdb"
   // };
 
-  @Test
+  @BeforeMethod(alwaysRun = true)
+  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,7 +71,7 @@ public class PDBFileWithJmolTest
     }
   }
 
-  @Test
+  @Test(groups = { "Functional" })
   public void testFileParser() throws Exception
   {
     for (String pdbStr : testFile)
@@ -81,14 +93,12 @@ public class PDBFileWithJmolTest
                 + " to the same sequence as MCView",
                 sq.getSequenceAsString(), mcseqs.remove(0)
                         .getSequenceAsString());
-        AlignmentI al = new Alignment(new SequenceI[]
-        { sq });
+        AlignmentI al = new Alignment(new SequenceI[] { sq });
         validateSecStrRows(al);
       }
     }
   }
 
-
   private void validateSecStrRows(AlignmentI al)
   {
     if (!al.isNucleotide())