de.berlios.jsunit.ant
Class JsUnitSuite

java.lang.Object
  extended byde.berlios.jsunit.ant.JsUnitSuite

public class JsUnitSuite
extends java.lang.Object

A JsUnit subtask modeling a test suite.

Since:
upcoming
Author:
Jörg Schaible

Nested Class Summary
static class JsUnitSuite.TestRunType
          The enumeration for the test type.
 
Constructor Summary
JsUnitSuite()
           
 
Method Summary
 void addFileSet(org.apache.tools.ant.types.FileSet fileSet)
          Add a FileSet with JsUnit tests.
 java.lang.String getCharacterSet()
          Requests the character set
 int getErrors()
          Retrieve the number of errors.
 int getFailures()
          Retrieve the number of failures.
 java.lang.String getName()
          Retrieves the name of the test suite.
 void run(org.apache.tools.ant.Project project, de.berlios.jsunit.JsUnitRhinoRunner runner)
          Run the test suite.
 void setCharacterSet(java.lang.String characterSet)
          Sets the character set.
 void setName(java.lang.String name)
          Set the name of the test suite.
 void setToDir(java.io.File toDir)
          Set the directory for the generated XML reports.
 void setType(JsUnitSuite.TestRunType type)
          Set the type of the test suite.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsUnitSuite

public JsUnitSuite()
Method Detail

setName

public void setName(java.lang.String name)
Set the name of the test suite.

Parameters:
name - the name
Since:
upcoming

getName

public java.lang.String getName()
Retrieves the name of the test suite.

Returns:
the name
Since:
upcoming

setType

public void setType(JsUnitSuite.TestRunType type)
Set the type of the test suite.

Parameters:
type - the type
Since:
upcoming
See Also:
JsUnitTask

setToDir

public void setToDir(java.io.File toDir)
Set the directory for the generated XML reports.

Parameters:
toDir - the target directory
Since:
upcoming

addFileSet

public void addFileSet(org.apache.tools.ant.types.FileSet fileSet)
Add a FileSet with JsUnit tests.

Parameters:
fileSet - the file set.
Since:
upcoming

setCharacterSet

public void setCharacterSet(java.lang.String characterSet)
Sets the character set.

Parameters:
characterSet - the name of the character set
Since:
upcoming

getCharacterSet

public java.lang.String getCharacterSet()
Requests the character set

Returns:
the name of the character set or null
Since:
upcoming

run

public void run(org.apache.tools.ant.Project project,
                de.berlios.jsunit.JsUnitRhinoRunner runner)
         throws org.apache.tools.ant.BuildException
Run the test suite.

Parameters:
project - the project
runner - the prepared Rhino context
Throws:
org.apache.tools.ant.BuildException - if the test cannot run or have been aborted
Since:
upcoming

getErrors

public int getErrors()
Retrieve the number of errors.

Returns:
the error count
Since:
upcoming

getFailures

public int getFailures()
Retrieve the number of failures.

Returns:
the failure count
Since:
upcoming


Copyright © 2007 Joerg Schaible. All Rights Reserved.