X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=testsrc%2Fcompbio%2Fdata%2Fmsa%2FCategoryTester.java;h=00a93f489c476c663915cd6ad284960d2a5b0468;hb=4abf762eaae51557c052fd10ca03a95894590002;hp=24abf130d7279efe7a37086abc63518196796914;hpb=d7fb99d4bd919ff8489433bcf143e192a4067beb;p=jabaws.git diff --git a/testsrc/compbio/data/msa/CategoryTester.java b/testsrc/compbio/data/msa/CategoryTester.java index 24abf13..00a93f4 100644 --- a/testsrc/compbio/data/msa/CategoryTester.java +++ b/testsrc/compbio/data/msa/CategoryTester.java @@ -9,23 +9,25 @@ import org.testng.Assert; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; +import compbio.metadata.AllTestSuit; import compbio.ws.client.Jws2Client; import compbio.ws.client.Services; +import compbio.ws.client.WSTesterTester; public class CategoryTester { // test category membership from string constants - compbio.data.msa.RegistryWS registry = null; + RegistryWS registry = null; - @BeforeTest + @BeforeTest(groups = AllTestSuit.test_group_webservices) public void setupTest() { try { /* * registry = Jws2Client .connectToRegistry( * "http://webserv1.cluster.lifesci.dundee.ac.uk:8089/jaba"); */ - registry = Jws2Client - .connectToRegistry("http://localhost:8080/jabaws"); + registry = Jws2Client.connectToRegistry(WSTesterTester.SERVER); + } catch (ConnectException e) { e.printStackTrace(); Assert.fail(e.getMessage()); @@ -35,7 +37,12 @@ public class CategoryTester { } } - @Test + + /* + * This test will FAIL unless a connection to a running JABAWS web server is + * made! + */ + @Test(groups = AllTestSuit.test_group_webservices) public void categoryTest() { Set servicecategories = registry.getServiceCategories(); @@ -56,8 +63,7 @@ public class CategoryTester { } } if (!found) { - throw new Error( - "Could not match any category to one of the given category constants"); + Assert.fail("Could not match any category to one of the given category constants"); } }