X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=test%2Fjalview%2Fws%2Fjabaws%2FMinJabawsClientTests.java;h=db5f9e4f9a01632da65c86716f0383211281a4f4;hb=cd7f028b24e8fccbcab05cf68acbea55da941943;hp=e1d1478d4d92ca168ac3b009609ffe6b64a0a153;hpb=838e4f91d4a53dd315640dbc9ff6ef7a815ee576;p=jalview.git diff --git a/test/jalview/ws/jabaws/MinJabawsClientTests.java b/test/jalview/ws/jabaws/MinJabawsClientTests.java index e1d1478..db5f9e4 100644 --- a/test/jalview/ws/jabaws/MinJabawsClientTests.java +++ b/test/jalview/ws/jabaws/MinJabawsClientTests.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1) - * Copyright (C) 2015 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -22,10 +22,13 @@ package jalview.ws.jabaws; import static org.testng.AssertJUnit.assertEquals; +import jalview.gui.JvOptionPane; + import java.util.ArrayList; import java.util.List; import org.testng.Assert; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import compbio.data.msa.MsaWS; @@ -38,6 +41,13 @@ import compbio.ws.client.Services; public class MinJabawsClientTests { + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + /** * simple test for the benefit of JAL-1338 * @@ -48,14 +58,19 @@ public class MinJabawsClientTests public void msaTest() throws Exception { String url; - RegistryWS registry = Jws2Client - .connectToRegistry(url = "http://www.compbio.dundee.ac.uk/jabaws"); + RegistryWS registry = Jws2Client.connectToRegistry( + url = "http://www.compbio.dundee.ac.uk/jabaws"); if (registry != null) { MsaWS msaservice = null; for (Services service : registry.getSupportedServices()) { + if (service == null) + { + // the 'unsupported service' + continue; + } if (service.equals(Services.ClustalOWS)) { msaservice = (MsaWS) Jws2Client.connect(url, service); @@ -67,7 +82,8 @@ public class MinJabawsClientTests } if (msaservice == null) { - Assert.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");