The next fragment must be un-indented
Description of a Fragment
Whole creation / execution / reporting environment for a specification
Execution of a Fragment
Execution of a Fragment
Specialized ForEach trait to use the Env in examples
Fragment of a specification
Fragment of a specification
It has a description (generally text but sometimes not, for a step for example) It has an execution which might do or don't do anything (for examples it runs some code)
Fragments of a specification
Fragments of a specification
It is implemented as a Process of Fragment in order to produce fragments dynamically if necessary
Function creating more fragments (to be added to the specification) based on the current result
Structure of an immutable specification.
Structure of an immutable specification.
It may depend on the current environment.
If the examples need to be executed in their own instance of the specification they will be "isolated"
Location of a Fragment
Location of a Fragment
This is currently implemented using stacktraces which is very brittle
Description of a Tag fragment
Header of a Specification
Header of a Specification
It can hold a user-defined title for better presentation
Structure of a Specification:
Structure of a Specification:
Note that the fragments have to be lazy in order to avoid cycles when 2 specifications are referencing each other with links
Reference to another specification
The next fragment must be indented
Text description
Break (== new line)
Creation methods for Descriptions
End of a block
NoText description, used when creating steps and actions which are not described
Create SpecStructures from header, arguments, fragments
Start of a block.
Start of a block. This is used to delimit the blocks in mutable specifications and know exactly how to create levels when transforming a specification to a tree of examples (for JUnit for example)
Whole creation / execution / reporting environment for a specification
Part of it is driven by the command-line, part of it is specs2 implementation Yet it can be used to drive the creation or execution of examples
Note: creating an Env instance is a delicate activity because the Env hold a thread pool that needs to be shutdown at the end of the execution