<?xml version="1.0"?>
<!--
 
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at
 
   http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 
-->

<project name="Apache.Qpid.Integration.Tests" default="test">

    <!-- Creates a .dll for this module. -->
    <target name="build">

        <csc target="library"
             define="${build.defines}"
             warnaserror="false" 
             debug="${build.debug}"
             output="${build.dir}/${project::get-name()}.dll">
            
            <sources>
                <include name="**/*.cs" />
            </sources>

            <references>
                <include name="${build.dir}/log4net.dll" />
                <include name="${build.dir}/nunit.framework.dll" />
                <include name="${build.dir}/Apache.Qpid.Common.dll" />
                <include name="${build.dir}/Apache.Qpid.Messaging.dll" />
                <include name="${build.dir}/Apache.Qpid.Client.dll" />
                <include name="${build.dir}/Apache.Qpid.Sasl.dll" />
            </references>
        </csc>

        <!--<copy tofile="${build.dir}/${project::get-name()}.dll.config" file="App.config" />-->
        <copy todir="${build.dir}" file="log4net.config"/>

    </target>

    <!-- Runs all of the tests in this module. -->
    <target name="test" depends="build">
        <nunit2 verbose="true">
            <formatter type="${nant.formatter}" usefile="true" outputdir="${build.dir}/testresults/" extension="txt"/>
            <formatter type="Plain" usefile="false"/>
            <test>
                <assemblies>
                    <include name="${build.dir}/${project::get-name()}.dll"/>
                </assemblies>
                <categories>
                    <include name="Integration"/>
                </categories>
            </test>
        </nunit2>
    </target>

</project>
