1 17 package org.apache.tools.ant.taskdefs.optional; 18 19 import java.io.*; 20 import java.util.Properties ; 21 22 import org.apache.tools.ant.BuildFileTest; 23 24 29 public class WsdlToDotnetTest extends BuildFileTest { 30 31 34 private final static String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/"; 35 36 37 42 public WsdlToDotnetTest(String name) { 43 super(name); 44 } 45 46 47 50 public void setUp() { 51 configureProject(TASKDEFS_DIR + "WsdlToDotnet.xml"); 52 } 53 54 55 58 public void tearDown() { 59 executeTarget("teardown"); 60 } 61 62 63 64 67 public void testNoParams() throws Exception { 68 expectBuildExceptionContaining("testNoParams", 69 "expected failure", 70 "destination file must be specified"); 71 } 72 73 76 public void testNoSrc() throws Exception { 77 expectBuildExceptionContaining("testNoSrc", 78 "expected failure", 79 "you must specify either a source file or a URL"); 80 } 81 82 85 public void testDestIsDir() throws Exception { 86 expectBuildExceptionContaining("testDestIsDir", 87 "expected failure", 88 "is a directory"); 89 } 90 91 94 public void testBothSrc() throws Exception { 95 expectBuildExceptionContaining("testBothSrc", 96 "expected failure", 97 "both a source file and a URL"); 98 } 99 102 public void testSrcIsDir() throws Exception { 103 expectBuildExceptionContaining("testSrcIsDir", 104 "expected failure", 105 "is a directory"); 106 } 107 108 111 public void testSrcIsMissing() throws Exception { 112 expectBuildExceptionContaining("testSrcIsMissing", 113 "expected failure", 114 "does not exist"); 115 } 116 117 120 public void testLocalWsdl() throws Exception { 121 executeTarget("testLocalWsdl"); 122 } 123 126 public void testLocalWsdlServer() throws Exception { 127 executeTarget("testLocalWsdlServer"); 128 } 129 132 public void testInvalidExtraOps() throws Exception { 133 expectBuildExceptionContaining("testInvalidExtraOps", 134 "expected failure", 135 "WSDL returned: 1"); 136 } 137 138 141 public void testLocalWsdlVB() throws Exception { 142 executeTarget("testLocalWsdlVB"); 143 } 144 147 public void testLocalWsdlServerVB() throws Exception { 148 executeTarget("testLocalWsdlServerVB"); 149 } 150 153 public void testInvalidExtraOpsVB() throws Exception { 154 expectBuildExceptionContaining("testInvalidExtraOpsVB", 155 "expected failure", 156 "WSDL returned: 1"); 157 } 158 } 159 160 | Popular Tags |