file format enum wip changes
[jalview.git] / test / jalview / ext / paradise / TestAnnotate3D.java
index 126c221..c2be67e 100644 (file)
@@ -24,7 +24,9 @@ import static org.testng.AssertJUnit.assertTrue;
 
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.SequenceI;
+import jalview.io.DataSourceType;
 import jalview.io.FastaFile;
+import jalview.io.FileFormat;
 import jalview.io.FormatAdapter;
 
 import java.io.BufferedReader;
@@ -43,8 +45,7 @@ import compbio.util.FileUtil;
 public class TestAnnotate3D
 {
 
-  @Test(groups =
-  { "Functional" }, enabled = false)
+  @Test(groups = { "Network" }, enabled = true)
   public void test1GIDbyId() throws Exception
   {
     // use same ID as standard tests given at
@@ -54,8 +55,7 @@ public class TestAnnotate3D
     testRNAMLcontent(ids, null);
   }
 
-  @Test(groups =
-  { "Functional" }, enabled = false)
+  @Test(groups = { "Network" }, enabled = true)
   public void testIdVsContent2GIS() throws Exception
   {
     Iterator<Reader> ids = Annotate3D.getRNAMLForPDBId("2GIS");
@@ -99,12 +99,11 @@ public class TestAnnotate3D
    * 
    * @throws Exception
    */
-  @Test(groups =
-  { "Functional" }, enabled = false)
+  @Test(groups = { "Network" }, enabled = true)
   public void testPDBfileVsRNAML() throws Exception
   {
     PDBfile pdbf = new PDBfile(true, false, true, "examples/2GIS.pdb",
-            FormatAdapter.FILE);
+            DataSourceType.FILE);
     Assert.assertTrue(pdbf.isValid());
     // Comment - should add new FileParse constructor like new FileParse(Reader
     // ..). for direct reading
@@ -114,8 +113,6 @@ public class TestAnnotate3D
     testRNAMLcontent(readers, pdbf);
   }
 
-  @Test(groups =
-  { "Functional" }, enabled = false)
   private void testRNAMLcontent(Iterator<Reader> readers, PDBfile pdbf)
           throws Exception
   {
@@ -133,7 +130,7 @@ public class TestAnnotate3D
       assertTrue("No data returned by Annotate3D", sb.length() > 0);
       final String lines = sb.toString();
       AlignmentI al = new FormatAdapter().readFile(lines,
-              FormatAdapter.PASTE, "RNAML");
+              DataSourceType.PASTE, FileFormat.Rnaml);
       if (al == null || al.getHeight() == 0)
       {
         System.out.println(lines);
@@ -149,9 +146,9 @@ public class TestAnnotate3D
             String sq_ = new String(sq.getSequence()).toLowerCase();
             for (SequenceI _struseq : pdbf.getSeqsAsArray())
             {
-              final String lowerCase = new String(_struseq.getSequence()).toLowerCase();
-              if (lowerCase.equals(
-                      sq_))
+              final String lowerCase = new String(_struseq.getSequence())
+                      .toLowerCase();
+              if (lowerCase.equals(sq_))
               {
                 struseq = _struseq;
                 break;
@@ -159,11 +156,13 @@ public class TestAnnotate3D
             }
             if (struseq == null)
             {
-              AssertJUnit.fail("Couldn't find this sequence in original input:\n"
-                      + new FastaFile().print(new SequenceI[]
-                      { sq })
-                      + "\n\nOriginal input:\n"
-                      + new FastaFile().print(pdbf.getSeqsAsArray()) + "\n");
+              AssertJUnit
+                      .fail("Couldn't find this sequence in original input:\n"
+                              + new FastaFile()
+                                      .print(new SequenceI[] { sq })
+                              + "\n\nOriginal input:\n"
+                              + new FastaFile().print(pdbf.getSeqsAsArray())
+                              + "\n");
             }
           }
         }