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

  <patternset id="source-files">
    <include name="CodeFormatters/TestGeneralCodeFormatter.cs"/>
    <include name="CodeFormatters/TestCodeFormatterCollection.cs"/>
    <include name="CodeFormatters/TestPlainTextCodeFormatter.cs"/>
    <include name="Controls/TestCodeBox.cs"/>
    <include name="Controls/TestCodeRenderingContext.cs"/>
    <include name="Controls/TestDefaultCodeRenderer.cs"/>
    <include name="Controls/TestDefaultErrorListRenderer.cs"/>
    <include name="Controls/TestErrorBrowser.cs"/>
    <include name="Controls/TestErrorList.cs"/>
    <include name="Controls/TestErrorPanelLayout.cs"/>
    <include name="Controls/TestErrorToolbar.cs"/>
    <include name="Controls/TestSourceCodeDisplay.cs"/>
    <include name="Controls/TestSplitterBox.cs"/>
    <include name="Controls/TestStackTraceDisplay.cs"/>
    <include name="CSharpParser/TestCSCode.cs"/>
    <include name="CSharpParser/TestCSParser.cs"/>
    <include name="CSharpParser/TestLexer.cs"/>
    <include name="CSharpParser/TestToken.cs"/>
    <include name="CSharpParser/TestTokenClassifier.cs"/>
    <include name="CSharpParser/TestTokenDictionary.cs"/>
    <include name="data/TestResource.cs"/>
    <include name="StackTraceAnalysers/TestFunctionParser.cs"/>
    <include name="StackTraceAnalysers/TestIErrorParser.cs"/>
    <include name="StackTraceAnalysers/TestLineNumberParser.cs"/>
    <include name="StackTraceAnalysers/TestPathParser.cs"/>
    <include name="StackTraceAnalysers/TestUnixPathParser.cs"/>
    <include name="StackTraceAnalysers/TestWindowsPathParser.cs"/>
    <include name="MockHelper.cs"/>
    <include name="TestDefaultTextManager.cs"/>
    <include name="TestExceptionItem.cs"/>
    <include name="TestExceptionItemCollection.cs"/>
    <include name="TestPaintLineLocation.cs"/>
    <include name="TestStackTraceParser.cs"/>
  </patternset>

  <patternset id="resource-files">
    <include name="data/HelloWorld.txt"/>
    <include name="data/TextCode.txt"/>
    <include name="data/Basic.cs"/>
  </patternset>

  <target name="build">
    <csc target="library" 
        output="${current.test.dir}/nunit.uiexception.tests.dll" 
        debug="${build.debug}" define="${build.defines}"
        if="${runtime.version >= '2.0'}">
      <sources>
        <patternset refid="source-files"/>
        <include name="../../GeneratedAssemblyInfo.cs"/>
      </sources>
      <resources prefix="NUnit.UiException.Tests.data">
        <patternset refid="resource-files"/>
      </resources>
      <references>
        <include name="System.dll"/>
        <include name="System.Drawing.dll"/>
        <include name="System.Windows.Forms.dll"/>
        <include name="${current.framework.dir}/nunit.framework.dll"/>
        <include name="${current.framework.dir}/nunit.mocks.dll"/>
        <include name="${current.lib.dir}/nunit.uiexception.dll"/>
        <include name="${current.lib.dir}/NSubstitute.dll" if="${runtime.version >= '3.5'}"/>
        <include name="${current.test.dir}/test-utilities.dll"/>
      </references>
    </csc>
  </target>

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

</project>