Hi Larry,
 
You can use the <nunit2> task for this purpose:
 
 
Hope this helps,
 
Gert


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Larry Richardson
Sent: donderdag 14 april 2005 5:16
To: [email protected]
Subject: [Nant-users] Integrating nUnit in nAnt build

First of all, newbie to the automated build tools, so this might be a easy question.

 

I have a simple HelloWorld program that I added nUnit test to. When I try to run nAnt, it says “Nunit.Framework cannot be found”. The dlls are in the build directory.

 

Thanks in advance..

Larry

 

Imports System

Imports NUnit.Framework

 

Public Class MainApp

    Shared Sub Main()

        Console.WriteLine("Hello World using VB.NET version 7")

        Return

    End Sub

End Class

 

<TestFixture()> _

Public Class SomeClassTests

 

    <Test()> _

    Public Sub TestMain()

            Main()

        Assert.IsTrue(true)

    End Sub

End Class

 

 

And a simple build file :

------------------------------------------------------------------------------------------------

<?xml version="1.0"?>

<project name="Hello World" default="test">

    <property name="basename" value="HelloWorld"/>

    <property name="debug" value="true"/>

    <target name="clean">

        <delete>

            <fileset>

                <includes name="${basename}-??.exe"/>

                <includes name="${basename}-??.pdb"/>

            </fileset>

        </delete>

    </target>

 

    <target name="build">

 

        <vbc target="exe" output="${basename}-vb.exe" debug="${debug}">

            <sources>

                <includes name="${basename}.vb"/>

            </sources>

         <references>

                                      <include name="nunit.framework.dll" />

                        </references>

 

        </vbc>

    </target>

 

    <target name="test" depends="build">

        <exec program="${basename}-vb.exe" basedir="."/>

    </target>

</project>

 

Reply via email to