1.1 --- a/samples/delegatingwriterfinal/build.xml Sat Jun 14 09:53:06 2008 +0200
1.2 +++ b/samples/delegatingwriterfinal/build.xml Sat Jun 14 09:53:06 2008 +0200
1.3 @@ -13,20 +13,29 @@
1.4 </antcall>
1.5
1.6 <antcall target="-build-one">
1.7 - <param name="version" value="test"/>
1.8 + <param name="version" value="test1.0"/>
1.9 <param name="cp" value="build/api1.0/classes:${junit.jar}"/>
1.10 </antcall>
1.11 +
1.12 + <antcall target="-build-one">
1.13 + <param name="version" value="test2.0"/>
1.14 + <param name="cp" value="build/api2.0/classes:${junit.jar}"/>
1.15 + </antcall>
1.16 </target>
1.17
1.18 <target name="test" depends="build">
1.19 - <echo level="info" message="Running the Implementation against Version 1.0 of the API. This should succeeds."/>
1.20 + <echo level="info" message="Running the Old Implementation against Version 1.0 of the API. This should succeed."/>
1.21 <antcall target="-run-one">
1.22 <param name="version" value="api1.0"/>
1.23 </antcall>
1.24 - <echo level="info" message="Running the Implementation against Version 2.0 of the API. This should fail."/>
1.25 + <echo level="info" message="Running the Old Implementation against Version 2.0 of the API. This should succeed."/>
1.26 <antcall target="-run-one">
1.27 <param name="version" value="api2.0"/>
1.28 </antcall>
1.29 + <echo level="info" message="Running the New Implementation against Version 2.0 of the API. This should succeed."/>
1.30 + <antcall target="-run-two">
1.31 + <param name="version" value="api2.0"/>
1.32 + </antcall>
1.33 </target>
1.34
1.35 <!-- support methods -->
1.36 @@ -40,15 +49,34 @@
1.37 <target name="-run-one">
1.38 <fail message="You need to specify API version number" unless="version"/>
1.39 <mkdir dir="build/testresults"/>
1.40 - <junit dir="build/test/classes" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
1.41 + <junit dir="build/test1.0/classes" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
1.42 <batchtest todir="build/testresults">
1.43 - <fileset dir="build/test/classes">
1.44 + <fileset dir="build/test1.0/classes">
1.45 <filename name="**/*Test.class"/>
1.46 </fileset>
1.47 </batchtest>
1.48 <classpath>
1.49 <path location="build/${version}/classes"/>
1.50 - <path location="build/test/classes"/>
1.51 + <path location="build/test1.0/classes"/>
1.52 + <path location="${junit.jar}"/>
1.53 + </classpath>
1.54 + <formatter type="brief" usefile="false"/>
1.55 + <formatter type="xml"/>
1.56 + </junit>
1.57 + </target>
1.58 +
1.59 + <target name="-run-two">
1.60 + <fail message="You need to specify API version number" unless="version"/>
1.61 + <mkdir dir="build/testresults"/>
1.62 + <junit dir="build/test2.0/classes" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
1.63 + <batchtest todir="build/testresults">
1.64 + <fileset dir="build/test2.0/classes">
1.65 + <filename name="**/*Test.class"/>
1.66 + </fileset>
1.67 + </batchtest>
1.68 + <classpath>
1.69 + <path location="build/${version}/classes"/>
1.70 + <path location="build/test2.0/classes"/>
1.71 <path location="${junit.jar}"/>
1.72 </classpath>
1.73 <formatter type="brief" usefile="false"/>