source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/src/testcases/org/apache/tools/ant/taskdefs/optional/WsdlToDotnetTest.java@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

File size: 4.0 KB
Line 
1/*
2 * Copyright 2002,2004 The Apache Software Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17package org.apache.tools.ant.taskdefs.optional;
18
19import java.io.*;
20import java.util.Properties;
21
22import org.apache.tools.ant.BuildFileTest;
23
24/**
25 * Tests the WsdlToDotnet task.
26 *
27 * @since Ant 1.5
28 */
29public class WsdlToDotnetTest extends BuildFileTest {
30
31 /**
32 * Description of the Field
33 */
34 private final static String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/";
35
36
37 /**
38 * Constructor
39 *
40 * @param name testname
41 */
42 public WsdlToDotnetTest(String name) {
43 super(name);
44 }
45
46
47 /**
48 * The JUnit setup method
49 */
50 public void setUp() {
51 configureProject(TASKDEFS_DIR + "WsdlToDotnet.xml");
52 }
53
54
55 /**
56 * The teardown method for JUnit
57 */
58 public void tearDown() {
59 executeTarget("teardown");
60 }
61
62
63
64 /**
65 * A unit test for JUnit
66 */
67 public void testNoParams() throws Exception {
68 expectBuildExceptionContaining("testNoParams",
69 "expected failure",
70 "destination file must be specified");
71 }
72
73 /**
74 * A unit test for JUnit
75 */
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 /**
83 * A unit test for JUnit
84 */
85 public void testDestIsDir() throws Exception {
86 expectBuildExceptionContaining("testDestIsDir",
87 "expected failure",
88 "is a directory");
89 }
90
91 /**
92 * A unit test for JUnit
93 */
94 public void testBothSrc() throws Exception {
95 expectBuildExceptionContaining("testBothSrc",
96 "expected failure",
97 "both a source file and a URL");
98 }
99 /**
100 * A unit test for JUnit
101 */
102 public void testSrcIsDir() throws Exception {
103 expectBuildExceptionContaining("testSrcIsDir",
104 "expected failure",
105 "is a directory");
106 }
107
108 /**
109 * A unit test for JUnit
110 */
111 public void testSrcIsMissing() throws Exception {
112 expectBuildExceptionContaining("testSrcIsMissing",
113 "expected failure",
114 "does not exist");
115 }
116
117 /**
118 * A unit test for JUnit
119 */
120 public void testLocalWsdl() throws Exception {
121 executeTarget("testLocalWsdl");
122 }
123 /**
124 * A unit test for JUnit
125 */
126 public void testLocalWsdlServer() throws Exception {
127 executeTarget("testLocalWsdlServer");
128 }
129 /**
130 * A unit test for JUnit
131 */
132 public void testInvalidExtraOps() throws Exception {
133 expectBuildExceptionContaining("testInvalidExtraOps",
134 "expected failure",
135 "WSDL returned: 1");
136 }
137
138 /**
139 * A unit test for JUnit
140 */
141 public void testLocalWsdlVB() throws Exception {
142 executeTarget("testLocalWsdlVB");
143 }
144 /**
145 * A unit test for JUnit
146 */
147 public void testLocalWsdlServerVB() throws Exception {
148 executeTarget("testLocalWsdlServerVB");
149 }
150 /**
151 * A unit test for JUnit
152 */
153 public void testInvalidExtraOpsVB() throws Exception {
154 expectBuildExceptionContaining("testInvalidExtraOpsVB",
155 "expected failure",
156 "WSDL returned: 1");
157 }
158}
159
Note: See TracBrowser for help on using the repository browser.