|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectgroovy.lang.GroovyObjectSupport
groovy.lang.Script
lsst.gruth.grutils.GruScript
abstract class GruScript extends groovy.lang.Script
Base script class for Gru DSL.
Contains all the base calls (functions the describe a test set)
and calls common to all contexts.
There are three phase for tests:
Property Summary | |
---|---|
groovy.lang.Binding |
_env
the calling environment (not used for the moment) |
groovy.lang.Binding |
_this
A current binding for all the script. |
GroupSpec |
currentBatchSpec
|
static GruScript |
running
|
Constructor Summary | |
GruScript()
|
|
GruScript(groovy.lang.Binding binding)
|
Method Summary | |
---|---|
java.lang.Object
|
_defaultBundle(java.lang.String name)
Helps resultReporters to determin a default bundle name for reports (example: a base name for files containing the report) |
java.lang.Object
|
_failIf(java.lang.String stringBooleanExpr)
Adds an AssertionReport to the current TztRun 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 TztRun 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 fails if false |
java.lang.Object
|
_failIfNot(java.lang.String message, boolean booleanExpr)
same specs as failIf but fails if false |
java.lang.Object
|
_message(java.lang.String message)
adds a message to the report @return |
java.lang.Object
|
_neutral(java.lang.String stringExpression)
Adds an AssertionReport to the current TztRun object: the result is NEUTRAL if the evaluation of the string is true (the report also contains the evaluated string). |
java.lang.Object
|
_neutral(java.lang.String message, groovy.lang.Closure closure)
Adds an AssertionReport to the current TztRun object: the result is NEUTRAL if the evaluation of the expression is true (the report also contains the message) |
java.lang.Object
|
_okIfCaught(java.lang.Class throwClass)
Adds an AssertionReport to the current TztRun object: forces the report to be ok if exception of this type is fires. |
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
|
_run(BuildGroupSpec buildSpec)
NOT IMPLEMENTED |
java.lang.Object
|
_runAll()
run all the test still registered in the global "groups" variable and run the reports. |
TaggedsMap
|
_vars(java.util.Map map)
Declares a set of Tagged objects. |
TaggedsMap
|
_vars()
|
java.lang.Object
|
_warnIf(java.lang.String stringBooleanExpr)
Adds an AssertionReport to the current TztRun 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 TztRun 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 |
BuildGroupSpec
|
_withClass(java.lang.Class clazz)
Starts registering a group of test specs for an existing class. |
GroupRun
|
_withClass(java.lang.Class clazz, groovy.lang.Closure clos)
Enables a simplified syntax for _withClass clazz _group { /test code / } that could be written : _withClass class {/ test code / } |
BuildGroupSpec
|
_withClass(java.lang.String className)
Starts registering a group of test specs for a class that may exist of not. |
BuildGroupSpec
|
_withClass(java.lang.String className, groovy.lang.Closure closure)
|
InvokeGroupSpec
|
_withObjects(java.lang.Object... objs)
Starts registering tests on tagged objects (instance methods are going to be tested) |
java.lang.Object
|
_xport(java.lang.String name, TaggedsMap map)
same as _vars but these are going to be exported to other tests batch
|
java.lang.Object
|
get_args()
|
java.lang.Object
|
get_argsNames()
|
java.lang.String
|
get_className()
normally not to be called but who knows? |
java.lang.Object
|
get_it()
|
java.lang.String
|
get_methodName()
|
java.lang.String
|
get_rawTestName()
|
java.lang.Object
|
get_result()
|
groovy.lang.Binding
|
get_thisL()
|
private void
|
initThis()
|
Methods inherited from class groovy.lang.Script | |
---|---|
groovy.lang.Script#println(), groovy.lang.Script#println(java.lang.Object), groovy.lang.Script#run(), groovy.lang.Script#run(java.io.File, [Ljava.lang.String;), groovy.lang.Script#setProperty(java.lang.String, java.lang.Object), groovy.lang.Script#getProperty(java.lang.String), groovy.lang.Script#print(java.lang.Object), groovy.lang.Script#printf(java.lang.String, java.lang.Object), groovy.lang.Script#printf(java.lang.String, [Ljava.lang.Object;), groovy.lang.Script#evaluate(java.lang.String), groovy.lang.Script#evaluate(java.io.File), groovy.lang.Script#getBinding(), groovy.lang.Script#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.Script#setBinding(groovy.lang.Binding), groovy.lang.Script#getMetaClass(), groovy.lang.Script#setMetaClass(groovy.lang.MetaClass), groovy.lang.Script#wait(), groovy.lang.Script#wait(long), groovy.lang.Script#wait(long, int), groovy.lang.Script#equals(java.lang.Object), groovy.lang.Script#toString(), groovy.lang.Script#hashCode(), groovy.lang.Script#getClass(), groovy.lang.Script#notify(), groovy.lang.Script#notifyAll() |
Methods inherited from class groovy.lang.GroovyObjectSupport | |
---|---|
groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll() |
Property Detail |
---|
groovy.lang.Binding _env
groovy.lang.Binding _this
Global variables :
GroupSpec currentBatchSpec
static GruScript running
Constructor Detail |
---|
GruScript()
GruScript(groovy.lang.Binding binding)
Method Detail |
---|
java.lang.Object _defaultBundle(java.lang.String name)
java.lang.Object _failIf(java.lang.String stringBooleanExpr)
stringBooleanExpr
- a Gstring representing a valid Groovy expression
java.lang.Object _failIf(java.lang.String message, boolean booleanExpr)
message
- to be displayed in the reportbooleanExpr
- before evaluating exceptionfired should be tested
java.lang.Object _failIfNot(java.lang.String stringBooleanExpr)
java.lang.Object _failIfNot(java.lang.String message, boolean booleanExpr)
java.lang.Object _message(java.lang.String message)
java.lang.Object _neutral(java.lang.String stringExpression)
stringBooleanExpr
- a Gstring representing a valid Groovy expression
java.lang.Object _neutral(java.lang.String message, groovy.lang.Closure closure)
message
- to be displayed in the report
java.lang.Object _okIfCaught(java.lang.Class throwClass)
java.io.Serializable _reportData(java.io.Serializable data)
data
- any serializable data
java.lang.Object _run(BuildGroupSpec buildSpec)
java.lang.Object _runAll()
TaggedsMap _vars(java.util.Map map)
TaggedsMap _vars()
java.lang.Object _warnIf(java.lang.String stringBooleanExpr)
stringBooleanExpr
- a Gstring representing a valid Groovy expression
java.lang.Object _warnIf(java.lang.String message, boolean booleanExpr)
message
- to be displayed in the report
java.lang.Object _warnIfNot(java.lang.String stringBooleanExpr)
java.lang.Object _warnIfNot(java.lang.String message, boolean booleanExpr)
BuildGroupSpec _withClass(java.lang.Class clazz)
clazz
- the class on which constructors or static code is to be tested
GroupRun _withClass(java.lang.Class clazz, groovy.lang.Closure clos)
clazz
- Class on which to call constructorclos
- group test specification
BuildGroupSpec _withClass(java.lang.String className)
className
- the class on which constructors or static code is to be tested
BuildGroupSpec _withClass(java.lang.String className, groovy.lang.Closure closure)
InvokeGroupSpec _withObjects(java.lang.Object... objs)
java.lang.Object _xport(java.lang.String name, TaggedsMap map)
java.lang.Object get_args()
java.lang.Object get_argsNames()
java.lang.String get_className()
java.lang.Object get_it()
java.lang.String get_methodName()
java.lang.String get_rawTestName()
java.lang.Object get_result()
groovy.lang.Binding get_thisL()
private void initThis()
Groovy Documentation