org.apache.ant.dotnet
Class NUnitTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.ant.dotnet.NUnitTask
All Implemented Interfaces:
java.lang.Cloneable

public class NUnitTask
extends org.apache.tools.ant.Task

Task to run the NUnit Console test runner.

See Also:
http://www.nunit.org/

Nested Class Summary
static class NUnitTask.NamedElement
           
 
Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
NUnitTask()
           
 
Method Summary
 void addConfiguredRedirector(org.apache.tools.ant.types.RedirectorElement redirectorElement)
          Add a RedirectorElement to this task.
 void addEnv(org.apache.tools.ant.types.Environment.Variable var)
          Add an environment variable to the launched process.
 void addExclude(NUnitTask.NamedElement a)
          Adds a category to the exclude list.
 void addInclude(NUnitTask.NamedElement a)
          Adds a category to the include list.
 void addTestAssembly(NUnitTask.NamedElement a)
          Adds a test assembly by name.
 void execute()
           
 void setConfig(java.io.File c)
          Sets the name of the config file.
 void setError(java.io.File err)
          The /err argument.
 void setErrorProperty(java.lang.String name)
          Name of property to set if a test fails.
 void setFailOnError(boolean b)
          Whether a failure should stop the build.
 void setFixture(java.lang.String fixture)
          The /fixture argument.
 void setLabels(boolean labels)
          The /labels argument.
 void setNoshadow(boolean noshadow)
          The /noshadow argument.
 void setOut(java.io.File out)
          The /output argument.
 void setThread(boolean thread)
          The /thread argument.
 void setTransform(java.io.File transform)
          The /transform argument.
 void setVm(java.lang.String value)
          Set the name of the executable for the virtual machine.
 void setXmlOut(java.io.File out)
          The /xml argument.
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NUnitTask

public NUnitTask()
Method Detail

setVm

public void setVm(java.lang.String value)
Set the name of the executable for the virtual machine.

Parameters:
value - the name of the executable for the virtual machine

setConfig

public void setConfig(java.io.File c)
Sets the name of the config file.


setOut

public void setOut(java.io.File out)
The /output argument.


setError

public void setError(java.io.File err)
The /err argument.


setXmlOut

public void setXmlOut(java.io.File out)
The /xml argument.


setTransform

public void setTransform(java.io.File transform)
The /transform argument.


setThread

public void setThread(boolean thread)
The /thread argument.


setFixture

public void setFixture(java.lang.String fixture)
The /fixture argument.


setNoshadow

public void setNoshadow(boolean noshadow)
The /noshadow argument.


setLabels

public void setLabels(boolean labels)
The /labels argument.


setFailOnError

public void setFailOnError(boolean b)
Whether a failure should stop the build.


setErrorProperty

public void setErrorProperty(java.lang.String name)
Name of property to set if a test fails.

Since:
1.0 Beta 2

addTestAssembly

public void addTestAssembly(NUnitTask.NamedElement a)
Adds a test assembly by name.


addInclude

public void addInclude(NUnitTask.NamedElement a)
Adds a category to the include list.


addExclude

public void addExclude(NUnitTask.NamedElement a)
Adds a category to the exclude list.


addEnv

public void addEnv(org.apache.tools.ant.types.Environment.Variable var)
Add an environment variable to the launched process.

Parameters:
var - new environment variable

addConfiguredRedirector

public void addConfiguredRedirector(org.apache.tools.ant.types.RedirectorElement redirectorElement)
Add a RedirectorElement to this task.

This does not use the out and error attributes, it only captures NUnits output that has not been redirected by those attributes.


execute

public void execute()
Overrides:
execute in class org.apache.tools.ant.Task