protoj.lang
Class JunitFeature

java.lang.Object
  extended by protoj.lang.JunitFeature

public final class JunitFeature
extends java.lang.Object

StandardProject helper that provides support for running junit tests.

Author:
Ashley Williams

Constructor Summary
JunitFeature(StandardProject project, java.lang.String memory)
          The individual property getter methods describe the parameters of the same includes.
 
Method Summary
 java.lang.String getMemory()
          The amount of memory to give to the forked vm that executes the unit tests.
 StandardProject getProject()
          The parent of this feature.
 void junit()
          Executes all the classes that contain 'Test' as part of their name.
 void junit(java.lang.String includes, java.lang.String excludes)
          Executes the junit tests filtering with the specified includes and excludes parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JunitFeature

public JunitFeature(StandardProject project,
                    java.lang.String memory)
The individual property getter methods describe the parameters of the same includes.

Parameters:
project -
memory -
Method Detail

getProject

public StandardProject getProject()
The parent of this feature.

Returns:

getMemory

public java.lang.String getMemory()
The amount of memory to give to the forked vm that executes the unit tests. Uses standard java tool notation, e.g. "32m".

Returns:

junit

public void junit()
Executes all the classes that contain 'Test' as part of their name. Delegates to junit(String, String).


junit

public void junit(java.lang.String includes,
                  java.lang.String excludes)
Executes the junit tests filtering with the specified includes and excludes parameters. All tests gain the following system property which can prove useful in locating project directories and files:

A junit test failure will result in an InformationException being thrown.

Parameters:
includes - The ant pattern that determines which java classes will be executed as junit tests. Set to null in order to not apply an includes pattern
excludes - The ant pattern that determines which java classes will not be executed as junit tests. Set to null in order to not apply an excludes pattern