public abstract class SpecificationNode extends Object
Specification as a tree structure.| Modifier and Type | Class and Description |
|---|---|
static interface |
SpecificationNode.ResetSharedState |
| Modifier and Type | Method and Description |
|---|---|
static SpecificationNode |
error(String description,
Throwable throwable)
Factory method for error nodes in the tree representing a specification,
indicating an exception thrown while building the specification tree itself.
|
static SpecificationNode |
internal(String description,
java.util.stream.Stream<SpecificationNode> children)
Factory method for internal nodes in the tree representing a specification.
|
static SpecificationNode |
leaf(String description)
Factory method for leaf nodes in the tree representing a specification.
|
static SpecificationNode |
leaf(String description,
Test test)
Factory method for leaf nodes in the tree representing a specification.
|
abstract SpecificationNode |
only()
Mark this node to be run exclusively (along with its children and any other nodes similarly marked)
|
SpecificationNode |
skip()
Mark this node to be skipped (along with its children and any other nodes similarly marked)
|
abstract SpecificationNode |
withReset(SpecificationNode.ResetSharedState reset)
Define a reset operation to clean up shared state between tests
|
public SpecificationNode skip()
public abstract SpecificationNode only()
public abstract SpecificationNode withReset(SpecificationNode.ResetSharedState reset)
reset - the reset operationpublic static SpecificationNode internal(String description, java.util.stream.Stream<SpecificationNode> children)
Specification
instead, unless creating their own behaviour mixin.description - description for this nodechildren - stream of child nodespublic static SpecificationNode leaf(String description)
Specification
instead, unless creating their own behaviour mixin.description - description for this nodepublic static SpecificationNode leaf(String description, Test test)
Specification
instead, unless creating their own behaviour mixin.description - description for this nodetest - optional automated test for this nodepublic static SpecificationNode error(String description, Throwable throwable)
Specification
instead, unless creating their own behaviour mixin.description - description for this nodethrowable - the original errorCopyright © 2017. All rights reserved.