1 22 package org.jboss.test.webservice.jbws637; 23 24 import javax.naming.InitialContext ; 25 26 import junit.framework.Test; 27 28 import org.jboss.test.webservice.WebserviceTestBase; 29 30 38 public class JBWS637TestCase extends WebserviceTestBase 39 { 40 private static CheckSoap port; 41 42 public JBWS637TestCase(String name) 43 { 44 super(name); 45 } 46 47 48 public static Test suite() throws Exception 49 { 50 return getDeploySetup(JBWS637TestCase.class, "ws4ee-jbws637-client.jar"); 51 } 52 53 protected void setUp() throws Exception 54 { 55 super.setUp(); 56 if (port == null) 57 { 58 InitialContext iniCtx = getClientContext(); 59 Check service = (Check)iniCtx.lookup("java:comp/env/service/Check"); 60 port = service.getCheckSoap(); 61 } 62 } 63 64 public void testCreateService() throws Exception 65 { 66 assertNotNull("port not null", port); 67 } 68 69 public void _testSuggestWord() throws Exception 70 { 71 String retStr = port.suggestWord("table"); 72 assertTrue(retStr.startsWith("Word already in CDYNE's Database.")); 73 } 74 75 public void _testCheckTextBody() throws Exception 76 { 77 String pangram = "Six big devils from Japan quickly forgot how to waltz."; 78 DocumentSummary sum = port.checkTextBody(pangram, "0"); 79 assertEquals(pangram, sum.getBody()); 80 } 81 } 82 | Popular Tags |