From d31836b43ff16f18c874854e225933fbf6f8e421 Mon Sep 17 00:00:00 2001 From: pvtroshin Date: Thu, 3 Nov 2011 10:15:05 +0000 Subject: [PATCH] remove a copy of category tester git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4708 e3abac25-378b-4346-85de-24260fe3988d --- testsrc/compbio/test/CategoryTester.java | 72 ------------------------------ 1 file changed, 72 deletions(-) delete mode 100644 testsrc/compbio/test/CategoryTester.java diff --git a/testsrc/compbio/test/CategoryTester.java b/testsrc/compbio/test/CategoryTester.java deleted file mode 100644 index 83f9cd7..0000000 --- a/testsrc/compbio/test/CategoryTester.java +++ /dev/null @@ -1,72 +0,0 @@ -package compbio.test; - -import java.net.ConnectException; -import java.util.Set; - -import javax.xml.ws.WebServiceException; - -import org.testng.Assert; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; - -import compbio.data.msa.Category; -import compbio.data.msa.RegistryWS; -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 - RegistryWS registry = null; - - @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(WSTesterTester.SERVER); - - } catch (ConnectException e) { - e.printStackTrace(); - Assert.fail(e.getMessage()); - } catch (WebServiceException e) { - e.printStackTrace(); - Assert.fail(e.getMessage()); - } - - } - - /* - * 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(); - - boolean found = false; - for (Category svccategory : servicecategories) { - - Set catservices; - - for (String category : new String[]{Category.CATEGORY_ALIGNMENT, - Category.CATEGORY_CONSERVATION, Category.CATEGORY_DISORDER}) { - if (category.equals(svccategory.name)) { - found = true; - catservices = svccategory.getServices(); - System.out.println("Found " + catservices.size() - + " services in category " + category - + "(service category string " + svccategory + ")"); - } - } - } - if (!found) { - Assert.fail("Could not match any category to one of the given category constants"); - } - } - -} -- 1.7.10.2