Merge branch 'develop' into update_212_Dec_merge_with_21125_chamges
[jalview.git] / test / jalview / ws / jabaws / DisorderAnnotExportImport.java
index 7bbd072..6bcc1da 100644 (file)
@@ -25,6 +25,7 @@ import static org.testng.AssertJUnit.assertNotNull;
 import static org.testng.AssertJUnit.assertTrue;
 
 import jalview.bin.Cache;
+import jalview.bin.Console;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.gui.JvOptionPane;
@@ -76,7 +77,7 @@ public class DisorderAnnotExportImport
   public static void setUpBeforeClass() throws Exception
   {
     Cache.loadProperties("test/jalview/io/testProps.jvprops");
-    Cache.initLogger();
+    Console.initLogger();
     disc = JalviewJabawsTestUtils.getJabawsDiscoverer();
 
     while (disc.isRunning())
@@ -89,7 +90,8 @@ public class DisorderAnnotExportImport
     disc2.startDiscoverer();
     while (disc2.isRunning())
     {
-      if (svc.getServiceTypeURI().toLowerCase(Locale.ROOT).contains("iupredws"))
+      if (svc.getServiceTypeURI().toLowerCase(Locale.ROOT)
+              .contains("iupredws"))
       {
         iupreds.add(svc);
       }
@@ -97,7 +99,8 @@ public class DisorderAnnotExportImport
     assertTrue("Couldn't discover any IUPred services to use to test.",
             iupreds.size() > 0);
     jalview.io.FileLoader fl = new jalview.io.FileLoader(false);
-    af = fl.LoadFileWaitTillLoaded(testseqs, jalview.io.DataSourceType.FILE);
+    af = fl.LoadFileWaitTillLoaded(testseqs,
+            jalview.io.DataSourceType.FILE);
     assertNotNull("Couldn't load test data ('" + testseqs + "')", af);
   }
 
@@ -168,30 +171,24 @@ public class DisorderAnnotExportImport
   {
     try
     {
-      String aligfileout = FileFormat.Pfam.getWriter(al).print(
-              al.getSequencesArray(), true);
+      String aligfileout = FileFormat.Pfam.getWriter(al)
+              .print(al.getSequencesArray(), true);
       String anfileout = new AnnotationFile()
               .printAnnotationsForAlignment(al);
-      assertTrue(
-              "Test "
-                      + testname
-                      + "\nAlignment annotation file was not regenerated. Null string",
+      assertTrue("Test " + testname
+              + "\nAlignment annotation file was not regenerated. Null string",
               anfileout != null);
-      assertTrue(
-              "Test "
-                      + testname
-                      + "\nAlignment annotation file was not regenerated. Empty string",
+      assertTrue("Test " + testname
+              + "\nAlignment annotation file was not regenerated. Empty string",
               anfileout.length() > "JALVIEW_ANNOTATION".length());
 
-      System.out.println("Output annotation file:\n" + anfileout
-              + "\n<<EOF\n");
+      System.out.println(
+              "Output annotation file:\n" + anfileout + "\n<<EOF\n");
 
       AlignmentI al_new = new FormatAdapter().readFile(aligfileout,
               DataSourceType.PASTE, FileFormat.Pfam);
-      assertTrue(
-              "Test "
-                      + testname
-                      + "\nregenerated annotation file did not annotate alignment.",
+      assertTrue("Test " + testname
+              + "\nregenerated annotation file did not annotate alignment.",
               new AnnotationFile().readAnnotationFile(al_new, anfileout,
                       DataSourceType.PASTE));
 
@@ -203,8 +200,7 @@ public class DisorderAnnotExportImport
     {
       e.printStackTrace();
     }
-    Assert.fail("Test "
-            + testname
+    Assert.fail("Test " + testname
             + "\nCouldn't complete Annotation file roundtrip input/output/input test.");
   }