X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fws%2Fjabaws%2FJalviewJabawsTestUtils.java;h=12f5e1b5cd1cc932025f614018161c62ec7bb95a;hb=f4766a7bbcfae845fc95923b01fa14ff83d589ff;hp=e6b7c588132d03745dd5539398b92b52738e8e42;hpb=ab22918ab8fc67d30dad1fb1ae0f37e51f49df95;p=jalview.git diff --git a/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java b/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java index e6b7c58..12f5e1b 100644 --- a/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java +++ b/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java @@ -20,13 +20,12 @@ */ package jalview.ws.jabaws; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - +import jalview.gui.JvOptionPane; import jalview.ws.jws2.Jws2Discoverer; import java.util.Vector; +import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -34,12 +33,19 @@ import org.testng.annotations.Test; public class JalviewJabawsTestUtils { - @BeforeClass + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + + @BeforeClass(alwaysRun = true) public static void setUpBeforeClass() throws Exception { } - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { } @@ -47,21 +53,35 @@ public class JalviewJabawsTestUtils /** * test servers */ - private static String[] serviceUrls = new String[] - { "http://localhost:8080/jabaws", + private static String[] serviceUrls = new String[] { + "http://localhost:8080/jabaws", "http://www.compbio.dundee.ac.uk/jabaws" }; - @Test(groups = - { "Functional" }, enabled = false) + @Test(groups = { "Functional" }, enabled = false) public void testAnnotExport() { - fail("Not yet implemented"); + Assert.fail("Not yet implemented"); } public static jalview.ws.jws2.Jws2Discoverer getJabawsDiscoverer() { return getJabawsDiscoverer(true); } + + /** + * Returns a service discoverer that queries localhost and compbio urls. + *

+ * If using this method, be sure to have read-only Jalview properties, to + * avoid writing the test urls to .jalview_properties. This can be done by + * either + *