<?xml version="1.0" ?>
<project name="Spring.Services.Tests" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd">
  <!--
    Required properties:
      * current.bin.dir           - (path) root level to build to
      * current.build.debug       - (true|false) debug build?
      * current.build.defines.csc - framework-specific build defines for C# compiler
-->
  <target name="build">
    <echo message="current.bin.dir = ${current.bin.dir}"/>
    <!-- build Spring.Services.Tests -->
    <csc target="library" define="${current.build.defines.csc}"
		     warnaserror="true"
		     debug="${current.build.debug}"
		     output="${current.bin.dir}/${project::get-name()}.dll"
		     doc="${current.bin.dir}/${project::get-name()}.xml">
      <nowarn>
        <warning number="${nowarn.numbers.test}" />
      </nowarn>
      <sources failonempty="true">
        <include name="**/*.cs" />
        <include name="../CommonAssemblyInfo.cs" />
        <exclude name="**/WindowsService/**" />
      </sources>
      <resources prefix="Spring" dynamicprefix="true" failonempty="true">
        <include name="**/*.xml" />
        <include name="**/*.wsdl" />
      </resources>
      <references basedir="${current.bin.dir}">
        <include name="*.dll" />
        <include if="${net-3.0.installed and net-3.0}" name="${net-3.0.ReferenceInstallPath}\System.ServiceModel.dll" />-->
        <exclude name="${project::get-name()}.dll" />
	<exclude name="CloverRuntime.dll" />
      </references>
    </csc>
    <copy todir="${current.bin.dir}">
      <fileset basedir="${project::get-base-directory()}/Data">
        <include name="**/*.xml" />
        <include name="**/*.wsdl" />
        <include name="**/*.xsd" />
      </fileset>
    </copy>
    <copy todir="${current.bin.dir}">
      <fileset basedir="${project::get-base-directory()}">
        <include name="**/*.config" />
      </fileset>
    </copy>
    <copy file="${project::get-base-directory()}/${project::get-name()}.dll.config"
          tofile="${current.bin.dir}/${project::get-name()}.dll.config"/>
  </target>
  <target name="test" depends="build">
    <nunit2outproc>
      <formatter type="Plain" />
      <formatter type="Xml" usefile="true" extension=".xml"
			           outputdir="${current.bin.dir}/results" />
      <test assemblyname="${current.bin.dir}/${project::get-name()}.dll" />
    </nunit2outproc>
  </target>
</project>
