|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectlsst.gruth.grutils.GroupSpec
class GroupSpec
Created initially by a call to _with**, it deals with a group of test specification. In the end will be expanded in a map of tests to execute and report.
Nested Class Summary | |
---|---|
static class |
GroupSpec.Combiner
A utility class tom help build combinations of tests. |
Property Summary | |
---|---|
static java.util.regex.Pattern |
NULL_PATTERN
|
groovy.lang.Binding |
_this
a copy of the _this global Binding |
groovy.lang.Binding |
_thisG
A binding specific to this group. |
java.lang.String |
className
name of Class: may be null if objects of different types are tested |
java.lang.Class |
clazz
the Class: may be null if objects of different types are tested |
java.lang.Object |
execCode
for constructors or static methods only (may differ if there are many objects). |
java.lang.String |
groupName
Name for group (either explicit or generated) |
java.util.List |
instances
specific to tests with instances. |
java.lang.String |
methodName
name of method |
java.util.List |
rawSpecs
the list of tests specification to be populated |
TztReport |
reportTemplate
a template for the TztReport that will be generated. |
groovy.lang.Closure |
setUpCode
code to be executed before running all tests in this group |
SpecType |
specType
type of specification. see SpecType. |
groovy.lang.Closure |
tearDownCode
code to be executed after the tests have been run |
Constructor Summary | |
GroupSpec(SpecType type, groovy.lang.Binding bind, java.lang.String className, java.lang.String methodName)
|
|
GroupSpec(SpecType type, groovy.lang.Binding bind, java.lang.String className)
|
|
GroupSpec(SpecType type, groovy.lang.Binding bind)
|
Method Summary | |
---|---|
GroupRun
|
_group(groovy.lang.Closure clos)
This method should be abstract : seed docs in subclasses. |
GroupRun
|
_post(groovy.lang.Closure clos)
code to be run once the tests of a group have been run (kind of teartDown code) |
GroupRun
|
_prepare()
Once the _group information has been collected, each _group code should end by calling this method. |
RawTestSpec
|
_test(java.util.Map map)
Prepares a RawTestSpec structure. |
RawTestSpec
|
_test(java.util.Map map, groovy.lang.Closure clos)
Enables a simplified syntax instead of _test map _xpect { / expectations/ } one can write _test map { / expectations/ } |
java.util.List
|
fromRawArgsToRawRuns(java.util.Map map, TztReport template, groovy.lang.Binding groupBind)
each element of the Map looks like KEY: arg1,ar2, arg3 KEY2: argn, argm KEY will become the "rootName" of a test run then each arg will be exploded:
|
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 |
---|
static java.util.regex.Pattern NULL_PATTERN
groovy.lang.Binding _this
groovy.lang.Binding _thisG
java.lang.String className
java.lang.Class clazz
java.lang.Object execCode
java.lang.String groupName
java.util.List instances
java.lang.String methodName
java.util.List rawSpecs
TztReport reportTemplate
groovy.lang.Closure setUpCode
SpecType specType
groovy.lang.Closure tearDownCode
Constructor Detail |
---|
GroupSpec(SpecType type, groovy.lang.Binding bind, java.lang.String className, java.lang.String methodName)
GroupSpec(SpecType type, groovy.lang.Binding bind, java.lang.String className)
GroupSpec(SpecType type, groovy.lang.Binding bind)
Method Detail |
---|
GroupRun _group(groovy.lang.Closure clos)
GroupRun _post(groovy.lang.Closure clos)
GroupRun _prepare()
RawTestSpec _test(java.util.Map map)
map
- : argument to be passed to the rawTestSpec structure.
RawTestSpec _test(java.util.Map map, groovy.lang.Closure clos)
java.util.List fromRawArgsToRawRuns(java.util.Map map, TztReport template, groovy.lang.Binding groupBind)
Groovy Documentation