JAL-1950 update constants to DataSourceType and FileFormat enums.
[jalview.git] / test / jalview / ws / ebi / HmmerJSONProcessTest.java
index efd33f0..bf68906 100644 (file)
@@ -3,6 +3,8 @@ package jalview.ws.ebi;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.SequenceI;
+import jalview.io.DataSourceType;
+import jalview.io.FileFormat;
 import jalview.io.FileParse;
 import jalview.io.FormatAdapter;
 
@@ -20,8 +22,8 @@ public class HmmerJSONProcessTest {
   private AlignmentI getSearchResultFragmentAlignment() throws Exception
   {
     AlignmentI alf = new FormatAdapter().readFile(
-            alignmentFragFile.getAbsolutePath(), FormatAdapter.FILE,
-            "FASTA");
+            alignmentFragFile.getAbsolutePath(), DataSourceType.FILE,
+            FileFormat.Fasta);
 
     return alf;
   }
@@ -32,8 +34,8 @@ public class HmmerJSONProcessTest {
   private AlignmentI getSearchResultAlignment() throws Exception
   {
     AlignmentI alf = new FormatAdapter().readFile(
-            alignmentResultFile.getAbsolutePath(), FormatAdapter.FILE,
-            "FASTA");
+            alignmentResultFile.getAbsolutePath(), DataSourceType.FILE,
+            FileFormat.Fasta);
 
     return alf;
   }
@@ -52,7 +54,7 @@ public class HmmerJSONProcessTest {
     JSONParser jp = new JSONParser();
     // read JSON in same way - via fileparse
     Object hitfragment = jp.parse(new FileParse(hitTestFile,
-            FormatAdapter.FILE).getReader());
+            DataSourceType.FILE).getReader());
     Assert.assertTrue((hitfragment instanceof JSONObject),
             "Didn't find a JSON object map in " + hitTestFile);
     AlignmentI searchResult = getSearchResultFragmentAlignment();
@@ -79,7 +81,7 @@ public class HmmerJSONProcessTest {
             "Didn't read search result alignment from " + alignmentFragFile);
 
     HmmerJSONProcessor hjsp = new HmmerJSONProcessor(searchResult);
-    hjsp.parseFrom(new FileParse(hmmerResultFile, FormatAdapter.FILE));
+    hjsp.parseFrom(new FileParse(hmmerResultFile, DataSourceType.FILE));
     AlignmentAnnotation[] aa = searchResult.getSequenceAt(5)
             .getAnnotation();
     Assert.assertNotNull(aa);