X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fws%2Fjabaws%2FJalviewJabawsTestUtils.java;h=12f5e1b5cd1cc932025f614018161c62ec7bb95a;hb=f4766a7bbcfae845fc95923b01fa14ff83d589ff;hp=72fa7a489968784ad70bf95209e49e75ee09d568;hpb=ddbd88c078781bdbe332dbc3e87b2ed600e717e3;p=jalview.git diff --git a/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java b/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java index 72fa7a4..12f5e1b 100644 --- a/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java +++ b/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java @@ -20,27 +20,32 @@ */ 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.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -import jalview.ws.jws2.Jws2Discoverer; +import org.testng.Assert; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +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 { } @@ -48,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 - @Ignore + @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 + *