Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
Result is returned from a `Evaluable.Eval` execution. It serves two purposes:
1) to return an error, if any, from the Eval execution. This error will *always* be a `gdterrors.RuntimeError`. Failed assertions are not errors. 2) to pass back information about the Run that can be injected into the context's `PriorRun` cache. Some plugins, e.g. the gdt-http plugin, use cached data from a previous run in order to construct current Run fixtures. In the case of the gdt=http plugin, the previous `nethttp.Response` is returned in the Result and the `Scenario.Run` method injects that information into the context that is supplied to the next Spec's `Run`.
func (*Result) Failed ¶ added in v1.1.0
Failed returns true if any assertion failed during Eval(), false otherwise.
func (*Result) Failures ¶ added in v1.1.0
Failures returns the collection of assertion failures that occurred during Eval().
func (*Result) SetFailures ¶ added in v1.1.0
SetFailures sets the result's collection of assertion failures.
type ResultModifier ¶
type ResultModifier func(*Result)
func WithData ¶
func WithData(key string, val interface{}) ResultModifier
WithData modifies the Result with the supplied run data key and value
func WithFailures ¶ added in v1.1.0
func WithFailures(failures ...error) ResultModifier
WithFailures modifies the Result the supplied collection of assertion failures