Browse Source

Brian's new tests

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273414 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 22 years ago
parent
commit
d8d8b2a5a5
2 changed files with 75 additions and 0 deletions
  1. +54
    -0
      src/etc/testcases/taskdefs/optional/WsdlToDotnet.xml
  2. +21
    -0
      src/testcases/org/apache/tools/ant/taskdefs/optional/WsdlToDotnetTest.java

+ 54
- 0
src/etc/testcases/taskdefs/optional/WsdlToDotnet.xml View File

@@ -13,6 +13,7 @@
<property name="out.csc" location="${src.dir}/out.cs"/>
<property name="out.app" location="${classes.dir}/out.dll"/>
<property name="out.type" value="module"/>
<property name="out.vbc" location="${src.dir}/out.vb"/>
<property name="endpoint"
value="http://nagoya.apache.org:5049/Axis/StockQuoteService.jws" />
<property name="endpoint.wsdl"
@@ -42,9 +43,18 @@
</or>
</condition>
<echo> csc.found=${csc.found}</echo>
<condition property="vbc.found">
<or>
<available file="vbc" filepath="${env.PATH}" />
<available file="vbc.exe" filepath="${env.PATH}" />
<available file="vbc.exe" filepath="${env.Path}" />
</or>
</condition>
<echo> vbc.found=${vbc.found}</echo>
<condition property="dotnetapps.found">
<and>
<isset property="csc.found"/>
<isset property="vbc.found"/>
<isset property="wsdl.found"/>
</and>
</condition>
@@ -125,5 +135,49 @@
srcFile="${local.wsdl}"
extraOptions="/newOption:not-one-known-of"
/>
</target>


<target name="testLocalWsdlVB" depends="init">
<wsdltodotnet destFile="${out.vbc}"
language="VB"
srcFile="${local.wsdl}"
/>
<vbc
srcDir="${src.dir}"
destFile="${out.app}"
targetType="${out.type}"
/>
<available property="app.created" file="${out.app}"/>
<fail unless="app.created">No app created</fail>
</target>
<target name="testLocalWsdlServerVB"
depends="init" >
<wsdltodotnet destFile="${out.vbc}"
language="VB"
srcFile="${local.wsdl}"
server="true"
/>
<vbc
srcDir="${src.dir}"
destFile="${out.app}"
targetType="${out.type}"
optionExplicit="true"
optionStrict="false"
optionCompare="text"
/>
<available property="app.created" file="${out.app}"/>
<fail unless="app.created">No app created</fail>
</target>
<target name="testInvalidExtraOpsVB" depends="init" if="vbc.found">
<wsdltodotnet destFile="${out.vbc}"
language="VB"
srcFile="${local.wsdl}"
extraOptions="/newOption:not-one-known-of"
/>
</target>

</project>

+ 21
- 0
src/testcases/org/apache/tools/ant/taskdefs/optional/WsdlToDotnetTest.java View File

@@ -172,5 +172,26 @@ public class WsdlToDotnetTest extends BuildFileTest {
"expected failure",
"WSDL returned: 1");
}
/**
* A unit test for JUnit
*/
public void testLocalWsdlVB() throws Exception {
executeTarget("testLocalWsdlVB");
}
/**
* A unit test for JUnit
*/
public void testLocalWsdlServerVB() throws Exception {
executeTarget("testLocalWsdlServerVB");
}
/**
* A unit test for JUnit
*/
public void testInvalidExtraOpsVB() throws Exception {
expectBuildExceptionContaining("testInvalidExtraOpsVB",
"expected failure",
"WSDL returned: 1");
}
}


Loading…
Cancel
Save