Header menu logo ApiStub.FSharp

BDD Module

Types

Type Description

Environment<'TStartup, 'FeatureStubData>

Defines the context propagated through the test

GivenResult<'ArrangeData, 'FeatureStubData, 'TStartup>

Result of a Given gherkin clause

Scenario<'TStartup>

Defines a BDD scenario

Step<'TStartup, 'FeatureStubData, 'ArrangeData, 'AssertData>

Generic step type for the BDD steps

WhenResult<'ArrangeData, 'FeatureStubData, 'AssertData, 'TStartup>

Result of a When gherkin clause

Functions and values

Function or value Description

END stepTask

Full Usage: END stepTask

Parameters:
Returns: Task<unit>

Conclude the pipeline of steps

stepTask : Task<Step<'a, 'b, 'c, 'd>>
Returns: Task<unit>

GIVEN setPreconditions stepTask

Full Usage: GIVEN setPreconditions stepTask

Parameters:
Returns: Task<Step<'a, 'b, 'ArrangeData, 'f>>

specify a GIVEN gherkin clause

setPreconditions : Environment<'a, 'b> -> 'c
stepTask : Task<Step<'a, 'b, 'd, 'e>>
Returns: Task<Step<'a, 'b, 'ArrangeData, 'f>>

SCENARIO useCase testClient

Full Usage: SCENARIO useCase testClient

Parameters:
Returns: Step<'a, 'b, 'c, 'd>

Scenario builder

useCase : string
testClient : TestClient<'a>
Returns: Step<'a, 'b, 'c, 'd>

SETUP arrangeTestEnvironment customizeClient step

Full Usage: SETUP arrangeTestEnvironment customizeClient step

Parameters:
Returns: Task<Step<'c, 'd, 'i, 'j>>

Setup the Environment for the given scenario

arrangeTestEnvironment : Scenario<'a> -> 'b
customizeClient : HttpClient -> 'e
step : Step<'a, 'f, 'g, 'h>
Returns: Task<Step<'c, 'd, 'i, 'j>>

THEN assertAction stepTask

Full Usage: THEN assertAction stepTask

Parameters:
Returns: Task<Step<'d, 'b, 'a, 'c>>

Specify an assert in THEN gherkin format

assertAction : WhenResult<'a, 'b, 'c, 'd> -> unit
stepTask : Task<Step<'d, 'b, 'a, 'c>>
Returns: Task<Step<'d, 'b, 'a, 'c>>

WHEN action stepTask

Full Usage: WHEN action stepTask

Parameters:
Returns: Task<Step<'c, 'b, 'a, 'e>>

specify a WHEN gherkin clause

action : GivenResult<'a, 'b, 'c> -> 'd
stepTask : Task<Step<'c, 'b, 'a, 'f>>
Returns: Task<Step<'c, 'b, 'a, 'e>>

Type something to start searching.