package jalview.ws.jabaws;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import static org.testng.AssertJUnit.assertEquals;
import java.util.ArrayList;
import java.util.List;
-import java.util.function.Consumer;
-import org.junit.Test;
+import org.testng.Assert;
+import org.testng.annotations.Test;
import compbio.data.msa.MsaWS;
import compbio.data.msa.RegistryWS;
import compbio.ws.client.Jws2Client;
import compbio.ws.client.Services;
-public class MinJabawsClientTests {
+public class MinJabawsClientTests
+{
/**
* simple test for the benefit of JAL-1338
}
}
if (msaservice == null) {
- fail("couldn't find a clustalO service on the public registry");
+ Assert.fail("couldn't find a clustalO service on the public registry");
}
FastaSequence fsq = new FastaSequence("seqA",
"SESESESESESESESSESESSESESESESESESESESESEEEEEESSESESESESSSSESESESESESESE");
}
String jobid = msaservice.align(iseqs);
- if (jobid != null) {
- JobStatus js = null;
- do {
- try {
- Thread.sleep(500);
- } catch (InterruptedException q) {
- }
- ;
- js = msaservice.getJobStatus(jobid);
- } while (!js.equals(JobStatus.FAILED)
- && !js.equals(JobStatus.CANCELLED)
- && !js.equals(JobStatus.FINISHED));
- assertEquals("Trial alignment failed. State was " + js.name(),
- js, JobStatus.FINISHED);
- assertEquals(
- "Mismatch in number of input and result sequences - assume alignment service wasn't interacted with correctly",
- msaservice.getResult(jobid).getSequences().size(),
- iseqs.size());
- msaservice.getResult(jobid).getSequences()
- .forEach(new Consumer<FastaSequence>() {
- @Override
- public void accept(FastaSequence t) {
- System.out.println(">"+t.getId());
- System.out.println(t.getFormattedFasta());
- }
- });
+ if (jobid != null)
+ {
+ JobStatus js = null;
+ do
+ {
+ try
+ {
+ Thread.sleep(500);
+ } catch (InterruptedException q)
+ {
+ }
+ ;
+ js = msaservice.getJobStatus(jobid);
+ } while (!js.equals(JobStatus.FAILED)
+ && !js.equals(JobStatus.CANCELLED)
+ && !js.equals(JobStatus.FINISHED));
+ assertEquals("Trial alignment failed. State was " + js.name(), js,
+ JobStatus.FINISHED);
+ assertEquals(
+ "Mismatch in number of input and result sequences - assume alignment service wasn't interacted with correctly",
+ msaservice.getResult(jobid).getSequences().size(),
+ iseqs.size());
+ for (FastaSequence t : msaservice.getResult(jobid).getSequences())
+ {
+ System.out.println(">" + t.getId());
+ System.out.println(t.getFormattedFasta());
+ }
+ // .forEach(new Consumer<FastaSequence>() {
+ // @Override
+ // public void accept(FastaSequence t) {
+ // System.out.println(">"+t.getId());
+ // System.out.println(t.getFormattedFasta());
+ // }
+ // });
}
}