<?xml version="1.0"?>
<project name="NUnit.Util.Tests" default="build">

  <patternset id="source-files">
    <include name="AssemblyListTests.cs"/>
    <include name="AssemblyWatcherTests.cs" if="${runtime.version >= '2.0'}"/>
    <include name="CategoryParseTests.cs"/>
    <include name="CategoryManagerTest.cs"/>
    <include name="DomainManagerTests.cs"/>
    <include name="EventDispatcherTests.cs" if="${runtime.version >= '2.0'}"/>
    <include name="FileWatcherTests.cs" if="${runtime.version >= '2.0'}"/>
    <include name="MemorySettingsStorageTests.cs"/>
    <include name="MockAssemblyWatcher.cs" if="${runtime.version >= '2.0'}"/>
    <include name="NUnitProjectLoad.cs"/>
    <include name="NUnitProjectSave.cs"/>
    <include name="NUnitProjectTests.cs"/>
    <include name="NUnitProjectXml.cs"/>
    <include name="NUnitRegistryTests.cs"/>
    <include name="PathUtilTests.cs"/>
    <include name="ProcessRunnerTests.cs" if="${runtime.version >= '2.0'}"/>
    <include name="ProjectConfigTests.cs"/>
    <include name="RecentFileEntryTests.cs" if="${runtime.version >= '2.0'}"/>
    <include name="RecentFilesTests.cs" if="${runtime.version >= '2.0'}"/>
    <include name="RegistrySettingsStorageTests.cs"/>
    <include name="RemoteTestResultTest.cs"/>
    <include name="RuntimeFrameworkSelectorTests.cs" if="${runtime.version >= '2.0'}"/>
    <include name="ServerUtilityTests.cs"/>
    <include name="ServiceManagerSetUpFixture.cs"/>
    <include name="SettingsGroupTests.cs"/>
    <include name="SummaryResultFixture.cs"/>
    <include name="TestAgencyTests.cs" if="${runtime.version >= '2.0'}"/>
    <include name="TestAgentTests.cs"/>
    <include name="TestDomainFixture.cs"/>
    <include name="TestDomainTests_Multiple.cs"/>
    <include name="TestEventCatcher.cs" if="${runtime.version >= '2.0'}"/>
    <include name="TestLoaderWatcherTests.cs" if="${runtime.version >= '2.0'}"/>
    <include name="TestLoaderAssemblyTests.cs" if="${runtime.version >= '2.0'}"/>
    <include name="TestRunnerFactoryTests.cs"/>
    <include name="TestServerTests.cs"/>
    <include name="VisualStudioConverterTests.cs"/>
    <include name="resources/TestResource.cs"/>
    <include name="VSProjectTests.cs"/>
    <include name="XmlResultWriterTest.cs"/>
  </patternset>

  <patternset id="resource-files">
    <include name="resources/*"/>
  </patternset>

  <target name="build">

    <csc target="library" 
       output="${current.test.dir}/nunit.util.tests.dll"
       debug="${build.debug}" define="${build.defines}">
      <sources>
        <patternset refid="source-files"/>
        <include name="../../GeneratedAssemblyInfo.cs"/>
      </sources>
      <resources prefix="NUnit.Util.Tests.resources">
        <patternset refid="resource-files"/>
      </resources>
      <references>
        <include name="System.Runtime.Remoting.dll"/>
        <include name="${current.framework.dir}/nunit.framework.dll"/>
        <include name="${current.framework.dir}/nunit.mocks.dll"/>
        <include name="${current.lib.dir}/nunit.core.interfaces.dll"/>
        <include name="${current.lib.dir}/nunit.core.dll"/>
        <include name="${current.lib.dir}/nunit.util.dll"/>
        <include name="${current.lib.dir}/nunit-server.dll"/>
        <include name="${current.test.dir}/nunit.core.tests.dll"/>
        <include name="${current.test.dir}/test-utilities.dll"/>
        <include name="${current.test.dir}/mock-assembly.dll"/>
        <include name="${current.test.dir}/nonamespace-assembly.dll"/>
      </references>
    </csc>
  </target>

  <target name="package">
    <copy todir="${package.src.dir}/ClientUtilities/tests">
      <fileset>
        <patternset refid="source-files"/>
        <patternset refid="resource-files"/>
        <include name="nunit.util.tests.csproj"/>
        <include name="nunit.util.tests.build"/>
      </fileset>
    </copy>
  </target>

</project>
