Groovy Documentation

lsst.gruth.grutils
[Groovy] Class TztReport

java.lang.Object
  lsst.gruth.grutils.TztReport
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, java.lang.Comparable, WithStringKey

class TztReport

Reports about the execution of a test. this structure is to be kept , stored and may be modified by other software

Authors:
bamade


Property Summary
groovy.lang.Binding _this

java.io.Serializable additionalData

used for reporting anything

java.util.List caught

java.lang.String className

java.lang.Object data

Object produced by test ... if not serializable will be dumped at Serialization.

boolean dontReport

used to declare this run not to be included in final report

boolean exceptionFired

java.util.List listAssertions

java.util.List messages

java.lang.String methodName

boolean noEqualsForResult

the result object does not have an "equals" method that can be used after serialization/deserialisation

RawDiagnostic rawDiagnostic

TaggedObject supportingObject

this Object may not be serialised: TaggedObject takes care of that

java.lang.String testName

name of test : see _rootName in TztRun

 
Constructor Summary
TztReport(java.lang.String className, java.lang.String methodName)

TztReport(java.lang.String className)

TztReport()

TztReport(java.lang.String testName, RawDiagnostic rawDiagnostic, java.lang.Object data, java.util.List caught)

 
Method Summary
java.lang.Object _doNotReport()

java.lang.Object _failIf(java.lang.String stringBooleanExpr)

Adds an AssertionReport to the current object: the result is FAILED if the evaluation of the string is true (the report also contains the evaluated string).

java.lang.Object _failIf(java.lang.String message, boolean booleanExpr)

Adds an AssertionReport to the current object: the result is FAILED if the evaluation of the expression is true (the report also contains the message)

java.lang.Object _failIfNot(java.lang.String stringBooleanExpr)

same specs as failIf but faisl if false

java.lang.Object _failIfNot(java.lang.String message, boolean booleanExpr)

same specs as failIf but fails if false

java.lang.Object _fill(TaggedsMap tMap)

void _message(java.lang.String message)

java.lang.Object _neutral(java.lang.String stringExpression)

java.lang.Object _neutral(java.lang.String message, groovy.lang.Closure closure)

java.lang.Object _okIfCaught(java.lang.Class throwClass)

java.io.Serializable _reportData(java.io.Serializable data)

used to add some data to the report (does not change the result of the test)

java.lang.Object _resultHasNoEquals()

java.lang.Object _warnIf(java.lang.String stringBooleanExpr)

Adds an AssertionReport to the current object: the result is WARNINGS if the evaluation of the string is true (the report also contains the evaluated string).

java.lang.Object _warnIf(java.lang.String message, boolean booleanExpr)

Adds an AssertionReport to the current object: the result is WARNINGS if the evaluation of the expression is true (the report also contains the message)

java.lang.Object _warnIfNot(java.lang.String stringBooleanExpr)

same specs as warnIf but warns if false

java.lang.Object _warnIfNot(java.lang.String message, boolean booleanExpr)

same specs as warnIf but warns if false

TztReport clone()

int compareTo(TztReport other)

void gatherResult()

java.lang.String getKey()

java.lang.String getSupportingObjectString()

java.lang.String getUniqueKey()

private void readObject(java.io.ObjectInputStream input)

protected void registerAssertion(java.lang.String stringBooleanExpression, boolean expected, RawDiagnostic result)

protected void registerAssertion(java.lang.String message, boolean actual, boolean expected, RawDiagnostic result)

void reportException(java.lang.Throwable th, RawDiagnostic result)

java.lang.String toString()

private void writeObject(java.io.ObjectOutputStream out)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Property Detail

_this

groovy.lang.Binding _this


additionalData

java.io.Serializable additionalData
used for reporting anything


caught

java.util.List caught


className

java.lang.String className


data

java.lang.Object data
Object produced by test ... if not serializable will be dumped at Serialization. (or replaced by a String)


dontReport

boolean dontReport
used to declare this run not to be included in final report


exceptionFired

boolean exceptionFired


listAssertions

java.util.List listAssertions


messages

java.util.List messages


methodName

java.lang.String methodName


noEqualsForResult

boolean noEqualsForResult
the result object does not have an "equals" method that can be used after serialization/deserialisation


rawDiagnostic

RawDiagnostic rawDiagnostic


supportingObject

TaggedObject supportingObject
this Object may not be serialised: TaggedObject takes care of that


testName

java.lang.String testName
name of test : see _rootName in TztRun


 
Constructor Detail

TztReport

TztReport(java.lang.String className, java.lang.String methodName)


TztReport

TztReport(java.lang.String className)


TztReport

TztReport()


TztReport

TztReport(java.lang.String testName, RawDiagnostic rawDiagnostic, java.lang.Object data, java.util.List caught)


 
Method Detail

_doNotReport

java.lang.Object _doNotReport()


_failIf

java.lang.Object _failIf(java.lang.String stringBooleanExpr)
Adds an AssertionReport to the current object: the result is FAILED if the evaluation of the string is true (the report also contains the evaluated string). [NOT WORKING PROPERLY -YET-]
Parameters:
stringBooleanExpr - a Gstring representing a valid Groovy expression
Returns:


_failIf

java.lang.Object _failIf(java.lang.String message, boolean booleanExpr)
Adds an AssertionReport to the current object: the result is FAILED if the evaluation of the expression is true (the report also contains the message)
Parameters:
message - to be displayed in the report
booleanExpr - before evaluating exceptionfired should be tested
Returns:


_failIfNot

java.lang.Object _failIfNot(java.lang.String stringBooleanExpr)
same specs as failIf but faisl if false
Parameters:
stringBooleanExpr
Returns:


_failIfNot

java.lang.Object _failIfNot(java.lang.String message, boolean booleanExpr)
same specs as failIf but fails if false


_fill

java.lang.Object _fill(TaggedsMap tMap)


_message

void _message(java.lang.String message)


_neutral

java.lang.Object _neutral(java.lang.String stringExpression)


_neutral

java.lang.Object _neutral(java.lang.String message, groovy.lang.Closure closure)


_okIfCaught

java.lang.Object _okIfCaught(java.lang.Class throwClass)


_reportData

java.io.Serializable _reportData(java.io.Serializable data)
used to add some data to the report (does not change the result of the test)
Parameters:
data - any serializable data
Returns:
the argument


_resultHasNoEquals

java.lang.Object _resultHasNoEquals()


_warnIf

java.lang.Object _warnIf(java.lang.String stringBooleanExpr)
Adds an AssertionReport to the current object: the result is WARNINGS if the evaluation of the string is true (the report also contains the evaluated string). [NOT WORKING PROPERLY -YET-]
Parameters:
stringBooleanExpr - a Gstring representing a valid Groovy expression
Returns:


_warnIf

java.lang.Object _warnIf(java.lang.String message, boolean booleanExpr)
Adds an AssertionReport to the current object: the result is WARNINGS if the evaluation of the expression is true (the report also contains the message)
Parameters:
message - to be displayed in the report
booleanExpr
Returns:


_warnIfNot

java.lang.Object _warnIfNot(java.lang.String stringBooleanExpr)
same specs as warnIf but warns if false


_warnIfNot

java.lang.Object _warnIfNot(java.lang.String message, boolean booleanExpr)
same specs as warnIf but warns if false


clone

TztReport clone()


compareTo

@Override
int compareTo(TztReport other)


gatherResult

void gatherResult()


getKey

java.lang.String getKey()


getSupportingObjectString

java.lang.String getSupportingObjectString()


getUniqueKey

java.lang.String getUniqueKey()


readObject

private void readObject(java.io.ObjectInputStream input)


registerAssertion

protected void registerAssertion(java.lang.String stringBooleanExpression, boolean expected, RawDiagnostic result)


registerAssertion

protected void registerAssertion(java.lang.String message, boolean actual, boolean expected, RawDiagnostic result)


reportException

void reportException(java.lang.Throwable th, RawDiagnostic result)


toString

java.lang.String toString()


writeObject

private void writeObject(java.io.ObjectOutputStream out)


 

Groovy Documentation