package script
- Alphabetic
- Public
- Protected
Type Members
- case class BulletedExamplesTemplate(factory: FragmentFactory)(implicit params: GroupTemplateParameters = BulletedExamplesTemplateParameters()) extends ScriptTemplate[GroupsScript, FragmentsScriptLines] with Product with Serializable
Analyse a piece of text and group Fragments belonging to the same group
- case class BulletedExamplesTemplateParameters() extends GroupTemplateParameters with Product with Serializable
- abstract class DelimitedStepParser[T] extends StepParser[T]
A Delimited step parser uses a delimiter (
{}
by default) to know which string to extract from the text - class DelimitedStepParser1[T] extends DelimitedStepParser[T]
- class DelimitedStepParser10[T] extends DelimitedStepParser[T]
- class DelimitedStepParser2[T] extends DelimitedStepParser[T]
- class DelimitedStepParser3[T] extends DelimitedStepParser[T]
- class DelimitedStepParser4[T] extends DelimitedStepParser[T]
- class DelimitedStepParser5[T] extends DelimitedStepParser[T]
- class DelimitedStepParser6[T] extends DelimitedStepParser[T]
- class DelimitedStepParser7[T] extends DelimitedStepParser[T]
- class DelimitedStepParser8[T] extends DelimitedStepParser[T]
- class DelimitedStepParser9[T] extends DelimitedStepParser[T]
- class DelimitedStepParserSeq[T] extends DelimitedStepParser[T]
- case class FragmentsScriptLines(blocks: Vector[FragmentsSeq]) extends ScriptLines with Product with Serializable
Block of fragments
- case class FragmentsSeq(fs: Vector[Fragment]) extends Product with Serializable
List of fragments with utility functions to manipulate it
- trait GroupTemplateParameters extends AnyRef
- case class GroupsScript(title: String = "groups", isStart: Boolean = true, groups: GroupsLike)(implicit template: ScriptTemplate[GroupsScript, FragmentsScriptLines], factory: FragmentFactory) extends Script with Product with Serializable
This script associates lines extracted by a template to example bodies defined by a GroupsLike trait.
This script associates lines extracted by a template to example bodies defined by a GroupsLike trait.
It can be called several times with a groupIndex and exampleIndex to know exactly which groups and examples it should start associating
- trait Script extends AnyRef
A Script is responsible for analysing a piece of text an creating a sequence of fragments.
A Script is responsible for analysing a piece of text an creating a sequence of fragments.
It usually uses a ScriptTemplate specifying how to parse the text into block of lines that the Script knows how to transform to fragments.
For example a GWT script (a
Scenario
) stores functions to create Given/When/Then steps and examples and the LastLinesScriptTemplate extract the last lines of a piece of text and divides them into blocks of Given/When/Then lines based on the number of steps in the Scenario. - trait ScriptLines extends AnyRef
set of lines returned by a ScriptTemplate
- trait ScriptTemplate[T <: Script, L <: ScriptLines] extends AnyRef
A ScriptTemplate parses some text to create ScriptLines that the associated script knows how to translate to Fragments.
A ScriptTemplate parses some text to create ScriptLines that the associated script knows how to translate to Fragments.
For example a script.Specification has a Script which takes text and asks the
BulletedExamplesTemplate
to return FragmentsScriptLines containing Text fragments for normal text and Examples for text that's starting with+
- trait Scripts extends AnyRef
The Scripts trait builds fragments based on Script objects.
The Scripts trait builds fragments based on Script objects.
When the script starts, a section tag is inserted and when it ends another one as well. Also when the scripts ends, it is passed the previous text for analysis to extract new fragments
- abstract class Spec extends specs2.Spec with SpecLike
- trait SpecLike extends specs2.Spec with Scripts with GroupsLike
Trait for the script.Spec abstract class
- abstract class Specification extends SpecificationLike
This Specification trait is using a Script (
GroupScript
) and a default templateBulletedExamplesTemplate
to associate extracted examples text (where there are+
signs) to example bodies coming from aGroup
.This Specification trait is using a Script (
GroupScript
) and a default templateBulletedExamplesTemplate
to associate extracted examples text (where there are+
signs) to example bodies coming from aGroup
. tod - trait SpecificationLike extends specs2.SpecificationLike with Scripts with GroupsLike
Trait for the script.Specification abstract class
- trait StandardDelimitedStepParsers extends AnyRef
a few delimited parsers (with
{}
) to extract ints, doubles and strings - trait StandardRegexStepParsers extends AnyRef
a few regular expression parsers to extract ints, doubles and strings (strings are delimited with
"
) - trait StepParser[T] extends AnyRef
A StepParser is a function to extract a value of type
T
from a piece of text It can also strip the text from delimiters if any - trait StepParsers extends ImplicitParameters
StepParsers are using delimiters or regular expressions with groups to extract values from a piece of text and possibly strip it from delimiters if necessary
Value Members
- object FragmentsSeq extends Serializable
- object StandardDelimitedStepParsers extends StandardDelimitedStepParsers
- object StandardRegexStepParsers extends StandardRegexStepParsers
- object StepParser extends StepParsers
- object StepParsers extends StepParsers