Griffon 1.2.0

org.codehaus.griffon.test.event
[Groovy] Class GriffonTestEventPublisher

java.lang.Object
  org.codehaus.griffon.test.event.GriffonTestEventPublisher

class GriffonTestEventPublisher

Publishes test related events to the Griffon build system.


Field Summary
protected Closure event

 
Constructor Summary
GriffonTestEventPublisher(Closure event)

@param event the "event" closure from the Griffon build system

 
Method Summary
void testCaseEnd(String name, String out = null, String err = null)

Signifies the end of a "unit" of tests.

void testCaseStart(String name)

Signifies the start of a "unit" of tests.

void testEnd(String name)

Signifies that a test has ended.

void testFailure(String name, Throwable failure, boolean isError = false)

Signifies that a test did not complete successfully.

void testFailure(String name, String failure = null, boolean isError = false)

Signifies that a test did not complete successfully.

void testStart(String name)

Signifies the start of an individual test, inside a parent "unit".

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

event

protected Closure event


 
Constructor Detail

GriffonTestEventPublisher

GriffonTestEventPublisher(Closure event)
Parameters:
event - the "event" closure from the Griffon build system


 
Method Detail

testCaseEnd

void testCaseEnd(String name, String out = null, String err = null)
Signifies the end of a "unit" of tests. (e.g. A JUnit TestCase). Must be called after testEnd with the same name as the most recent call to testCaseStart. Publishes the event TestCaseEnd with name as the parameter.
Parameters:
name - a logical name for the test "unit"


testCaseStart

void testCaseStart(String name)
Signifies the start of a "unit" of tests. (e.g. A JUnit TestCase). Must be called first, or after testCaseEnd(String, String, String). Publishes the event TestCaseStart with name as the parameter.
Parameters:
name - a logical name for the test "unit"


testEnd

void testEnd(String name)
Signifies that a test has ended. Must be called after testStart with the same name, or testStart or testStart with the same name. Publishes the event TestEnd with name as the parameter.
Parameters:
name - a logical name for the test
failure - a description of the failure
isError - true if this failure was due to an indirect error, false if this failure was a direct assertion failure or incorrect assumption


testFailure

void testFailure(String name, Throwable failure, boolean isError = false)
Signifies that a test did not complete successfully. Must be called after testStart with the same name. Publishes the event TestFailure with name, failure and isError as the parameters.
Parameters:
name - a logical name for the test
failure - the throwable raised from the failure
isError - true if this failure was due to an indirect error, false if this failure was a direct assertion failure or incorrect assumption


testFailure

void testFailure(String name, String failure = null, boolean isError = false)
Signifies that a test did not complete successfully. Must be called after testStart with the same name. Publishes the event TestFailure with name, failure and isError as the parameters.
Parameters:
name - a logical name for the test
failure - a description of the failure
isError - true if this failure was due to an indirect error, false if this failure was a direct assertion failure or incorrect assumption


testStart

void testStart(String name)
Signifies the start of an individual test, inside a parent "unit". Must be called after testCaseStart or after testEnd. Publishes the event TestStart with name as the parameter.
Parameters:
name - a logical name for the test


 

Groovy Documentation