1 package compbio.ws.server;
\r
3 import static org.testng.Assert.assertEquals;
\r
4 import static org.testng.Assert.assertNotNull;
\r
5 import static org.testng.Assert.assertTrue;
\r
6 import static org.testng.Assert.fail;
\r
8 import java.util.EnumSet;
\r
10 import org.testng.annotations.Test;
\r
12 import compbio.metadata.AllTestSuit;
\r
13 import compbio.ws.client.Jws2Client;
\r
14 import compbio.ws.client.Services;
\r
15 import compbio.ws.client.WSTesterTester;
\r
17 public class RegistryWSTester {
\r
19 @Test(groups = {AllTestSuit.test_group_windows_only})
\r
20 public void testGetSupportedServices() {
\r
21 compbio.data.msa.RegistryWS reg = Jws2Client
\r
22 .connectToRegistry(WSTesterTester.SERVER);
\r
23 assertEquals(EnumSet.of(Services.AAConWS, Services.JronnWS,
\r
24 Services.MuscleWS, Services.ClustalWS),
\r
25 reg.getSupportedServices());
\r
28 public void testTestService() {
\r
29 compbio.data.msa.RegistryWS reg = Jws2Client
\r
30 .connectToRegistry(WSTesterTester.SERVER);
\r
31 assertNotNull(reg.testService(Services.AAConWS));
\r
34 @Test(dependsOnMethods = {"testTestService"})
\r
35 public void testIsOperating() {
\r
36 compbio.data.msa.RegistryWS reg = Jws2Client
\r
37 .connectToRegistry(WSTesterTester.SERVER);
\r
38 assertTrue(reg.isOperating(Services.AAConWS));
\r
41 @Test(dependsOnMethods = {"testTestService"})
\r
42 public void testGetLastTestedOn() {
\r
43 compbio.data.msa.RegistryWS reg = Jws2Client
\r
44 .connectToRegistry(WSTesterTester.SERVER);
\r
45 assertNotNull(reg.getLastTestedOn(Services.AAConWS));
\r
48 @Test(dependsOnMethods = {"testTestService"})
\r
49 public void testGetLastTested() {
\r
52 } catch (InterruptedException e) {
\r
53 e.printStackTrace();
\r
54 fail(e.getMessage());
\r
56 compbio.data.msa.RegistryWS reg = Jws2Client
\r
57 .connectToRegistry(WSTesterTester.SERVER);
\r
58 System.out.println(reg.getLastTested(Services.AAConWS));
\r
59 assertTrue(reg.getLastTested(Services.AAConWS) > 0);
\r
63 public void testTestAllServices() {
\r
64 compbio.data.msa.RegistryWS reg = Jws2Client
\r
65 .connectToRegistry(WSTesterTester.SERVER);
\r
66 System.out.println(reg.testAllServices());
\r