Documentation ¶
Overview ¶
Package unbrokenwing provides help methods used by test-code generated by unbrokenwing command.
Index ¶
- func And(step string, do func(Args) error) (err error)
- func But(step string, do func(Args) error) (err error)
- func Failure(reason string) error
- func Given(step string, do func(Args) error) (err error)
- func NotImplemented(t Step) error
- func Pending(reason string) error
- func Then(step string, do func(Args) error) (err error)
- func When(step string, do func(Args) error) (err error)
- type Args
- type FailureError
- type Feature
- type NotImplError
- type PendingError
- type Scenario
- type Step
- type Suite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func And ¶
And are used to map scenario steps with behaviours, this is mapped by matching regular expression in first argument against scenario step in Gherkin language.
func But ¶
But are used to map scenario steps with behaviours, this is mapped by matching regular expression in first argument against scenario step in Gherkin language.
func Failure ¶
Failure returns error that are suitable to be returned from behaviour descriptions that failes during test.
func Given ¶
Given are used to map scenario steps with behaviours, this is mapped by matching regular expression in first argument against scenario step in Gherkin language.
func NotImplemented ¶
NotImplemented returns error that are suitable to be returned when unbrokenwings driver are not able to find matching behaviour implementation.
func Pending ¶
Pending returns error that are suitable to be returned from behaviour descriptions that are generated but not implemented yet.
Types ¶
type FailureError ¶
type FailureError struct {
// contains filtered or unexported fields
}
FailureError are suitable to be returned from behaviour descriptions that failes during test.
func (FailureError) Error ¶
func (e FailureError) Error() string
type Feature ¶
Feature contains data structure matching features in Gherkin. Each Scenario in Scenarios contains Description and scenario steps according to Gherkin scenarios.
func NewFeature ¶
NewFeature scans FeatureFile for lines starting with "Feature:" followed by feature name, description and different scenarios. All scenarios including description are then returned as a Feature.
type NotImplError ¶
type NotImplError struct {
// contains filtered or unexported fields
}
NotImplError are suitable to be returned when unbrokenwings driver are not able to find matching behaviour implementation.
func (NotImplError) Error ¶
func (e NotImplError) Error() string
type PendingError ¶
type PendingError struct {
// contains filtered or unexported fields
}
PendingError are suitable to be returned from behaviour descriptions that are generated but not implemented yet.
func (PendingError) Error ¶
func (e PendingError) Error() string
type Scenario ¶
Scenario contains data structure matching scenarios in Gherkin. Description holds all text from scenario line till first scenario step.
type Step ¶
Step corresponds to the a function related to a Given, When and Then-step.
Cmd correspons to one of following commands: Given, When, Then, But, And Description contains the rest of the text that follows after the command.