01: package org.objectweb.celtix.tools;
02:
03: import org.objectweb.celtix.tools.common.ToolTestBase;
04:
05: public class JavaToWSDLTest extends ToolTestBase {
06:
07: public void testVersionOutput() throws Exception {
08: String[] args = new String[] { "-v" };
09: JavaToWSDL.main(args);
10: assertNotNull(getStdOut());
11: }
12:
13: public void testHelpOutput() {
14: String[] args = new String[] { "-help" };
15: JavaToWSDL.main(args);
16: assertNotNull(getStdOut());
17: }
18:
19: public void testNormalArgs() {
20: String[] args = new String[] { "-o", "./test.wsdl",
21: "org.objectweb.hello_world_soap_http.Greeter" };
22: JavaToWSDL.main(args);
23: assertNotNull(getStdOut());
24: }
25:
26: public void testBadUsage() {
27: String[] args = new String[] { "-ttt", "a.ww" };
28: JavaToWSDL.main(args);
29: assertNotNull(getStdOut());
30:
31: }
32:
33: public void testValidArgs() {
34: String[] args = new String[] { "a.ww" };
35: JavaToWSDL.main(args);
36: assertNotNull(getStdOut());
37:
38: }
39:
40: public void testNoOutPutFile() {
41: String[] args = new String[] { "org.objectweb.hello_world_soap_http.Greeter" };
42: JavaToWSDL.main(args);
43: assertNotNull(getStdOut());
44: }
45:
46: }
|