You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ha...@apache.org on 2005/06/14 18:50:49 UTC

cvs commit: ws-axis/c/build testInitialize.xml

hawkeye     2005/06/14 09:50:49

  Modified:    c/build  testInitialize.xml
  Log:
  Creation of unit test system
  
  Revision  Changes    Path
  1.9       +20 -0     ws-axis/c/build/testInitialize.xml
  
  Index: testInitialize.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/build/testInitialize.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- testInitialize.xml	14 Jun 2005 14:44:34 -0000	1.8
  +++ testInitialize.xml	14 Jun 2005 16:50:49 -0000	1.9
  @@ -36,6 +36,26 @@
   	<target name="loadXMLProperties">
   		<echo message="Loading XML file ${test_property}"/>
   		<xmlproperty file="${test_property}" keepRoot="true"/>
  +		<!-- If we're in mockserver mode then change the test name to show that -->
  +		<!-- also do some checks to ensure that the test is really a unit test and no one has got confused :-) -->
  +		<if>
  +			<equals arg1="${mockServer}" arg2="true"/>
  +			<then>
  +				<!-- check that the serverresponse file has been set -->
  +				<if>
  +					<not>
  +						<isset property="test.expected.serverResponse"/>
  +					</not>
  +					<then>
  +						<echo message="in unit test mode but not got a server response file set to return"/>
  +						<throw message="in unit test mode but not got a server response file set to return"/>
  +					</then>
  +				</if>
  +				<!-- make sure the name has "unit test" in it -->
  +				<propertyregex property="test.name" override="true" input="${test.name}" regexp="${test.name}" replace="UnitTest_${test.name}"/>
  +				
  +			</then>
  +		</if>
   	</target>
   <!--	<target name="setTestName" if="test.name">
   		<propertycopy property="testName" from="test.name"/>