A few minor changes to the test
[jabaws.git] / testsrc / compbio / data / msa / CategoryTester.java
index 24abf13..00a93f4 100644 (file)
@@ -9,23 +9,25 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeTest;\r
 import org.testng.annotations.Test;\r
 \r
+import compbio.metadata.AllTestSuit;\r
 import compbio.ws.client.Jws2Client;\r
 import compbio.ws.client.Services;\r
+import compbio.ws.client.WSTesterTester;\r
 \r
 public class CategoryTester {\r
 \r
        // test category membership from string constants\r
-       compbio.data.msa.RegistryWS registry = null;\r
+       RegistryWS registry = null;\r
 \r
-       @BeforeTest\r
+       @BeforeTest(groups = AllTestSuit.test_group_webservices)\r
        public void setupTest() {\r
                try {\r
                        /*\r
                         * registry = Jws2Client .connectToRegistry(\r
                         * "http://webserv1.cluster.lifesci.dundee.ac.uk:8089/jaba");\r
                         */\r
-                       registry = Jws2Client\r
-                                       .connectToRegistry("http://localhost:8080/jabaws");\r
+                       registry = Jws2Client.connectToRegistry(WSTesterTester.SERVER);\r
+\r
                } catch (ConnectException e) {\r
                        e.printStackTrace();\r
                        Assert.fail(e.getMessage());\r
@@ -35,7 +37,12 @@ public class CategoryTester {
                }\r
 \r
        }\r
-       @Test\r
+\r
+       /*\r
+        * This test will FAIL unless a connection to a running JABAWS web server is\r
+        * made!\r
+        */\r
+       @Test(groups = AllTestSuit.test_group_webservices)\r
        public void categoryTest() {\r
                Set<Category> servicecategories = registry.getServiceCategories();\r
 \r
@@ -56,8 +63,7 @@ public class CategoryTester {
                        }\r
                }\r
                if (!found) {\r
-                       throw new Error(\r
-                                       "Could not match any category to one of the given category constants");\r
+                       Assert.fail("Could not match any category to one of the given category constants");\r
                }\r
        }\r
 \r