*/
package jalview.ws.jabaws;
+import java.util.Locale;
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;
public static void setUpBeforeClass() throws Exception
{
Cache.loadProperties("test/jalview/io/testProps.jvprops");
- Cache.initLogger();
+ Console.initLogger();
disc = JalviewJabawsTestUtils.getJabawsDiscoverer(false);
while (disc.isRunning())
for (ServiceWithParameters svc : disc.getServices())
{
- if (svc.getNameURI().toLowerCase().contains("rnaalifoldws"))
+ if (svc.getServiceTypeURI().toLowerCase(Locale.ROOT)
+ .contains("rnaalifoldws"))
{
rnaalifoldws = (Jws2Instance) svc;
}
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);
try
{
// what format would be appropriate for RNAalifold annotations?
- String aligfileout = FileFormat.Pfam.getWriter(null).print(
- al.getSequencesArray(), true);
+ String aligfileout = FileFormat.Pfam.getWriter(null)
+ .print(al.getSequencesArray(), true);
String anfileout = new AnnotationFile()
.printAnnotationsForAlignment(al);
- assertNotNull(
- "Test "
- + testname
- + "\nAlignment annotation file was not regenerated. Null string",
+ assertNotNull("Test " + testname
+ + "\nAlignment annotation file was not regenerated. Null string",
anfileout);
- 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");
// again what format would be appropriate?
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));
{
e.printStackTrace();
}
- Assert.fail("Test "
- + testname
+ Assert.fail("Test " + testname
+ "\nCouldn't complete Annotation file roundtrip input/output/input test.");
}
}
;
} while (af.getViewport().getCalcManager().isWorking());
- AutoCalcSetting oldacs = af.getViewport().getCalcIdSettingsFor(
- alifoldClient.getCalcId());
+ AutoCalcSetting oldacs = af.getViewport()
+ .getCalcIdSettingsFor(alifoldClient.getCalcId());
String oldsettings = oldacs.getWsParamFile();
// write out parameters
jalview.gui.AlignFrame nalf = null;
- assertTrue("Couldn't write out the Jar file",
- new Jalview2XML(false).saveAlignment(af, JAR_FILE_NAME,
- "trial parameter writeout"));
- assertTrue("Couldn't read back the Jar file", (nalf = new Jalview2XML(
- false).loadJalviewAlign(JAR_FILE_NAME)) != null);
+ assertTrue("Couldn't write out the Jar file", new Jalview2XML(false)
+ .saveAlignment(af, JAR_FILE_NAME, "trial parameter writeout"));
+ assertTrue("Couldn't read back the Jar file",
+ (nalf = new Jalview2XML(false)
+ .loadJalviewAlign(JAR_FILE_NAME)) != null);
if (nalf != null)
{
- AutoCalcSetting acs = af.getViewport().getCalcIdSettingsFor(
- alifoldClient.getCalcId());
+ AutoCalcSetting acs = af.getViewport()
+ .getCalcIdSettingsFor(alifoldClient.getCalcId());
assertTrue("Calc ID settings not recovered from viewport stash",
acs.equals(oldacs));
assertTrue(
}
;
}
- AutoCalcSetting acs2 = af.getViewport().getCalcIdSettingsFor(
- alifoldClient.getCalcId());
+ AutoCalcSetting acs2 = af.getViewport()
+ .getCalcIdSettingsFor(alifoldClient.getCalcId());
assertTrue(
"Calc ID settings after recalculation has not been recovered.",
acs2.getWsParamFile().equals(oldsettings));