Table of Contents

Class ScenarioOutlineTerminal<TExample, T>

Namespace
TinyBDD
Assembly
TinyBDD.dll

Represents a terminal scenario outline that can be executed with examples.

public sealed class ScenarioOutlineTerminal<TExample, T>

Type Parameters

TExample

The type of example data.

T

The value type in the chain.

Inheritance
ScenarioOutlineTerminal<TExample, T>
Inherited Members

Methods

And(string, Func<T, bool>)

Adds an And assertion without using example data.

public ScenarioOutlineTerminal<TExample, T> And(string title, Func<T, bool> predicate)

Parameters

title string

The step title.

predicate Func<T, bool>

A predicate that receives the current value.

Returns

ScenarioOutlineTerminal<TExample, T>

This terminal chain for further chaining.

And(string, Func<T, TExample, bool>)

Adds an And assertion that uses example data.

public ScenarioOutlineTerminal<TExample, T> And(string title, Func<T, TExample, bool> predicate)

Parameters

title string

The step title.

predicate Func<T, TExample, bool>

A predicate that receives the current value and example data.

Returns

ScenarioOutlineTerminal<TExample, T>

This terminal chain for further chaining.

AssertAllPassedAsync(CancellationToken)

Executes the scenario outline for all examples and asserts all passed.

public Task AssertAllPassedAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Optional cancellation token.

Returns

Task

Exceptions

AggregateException

Thrown when one or more examples failed.

But(string, Func<T, TExample, bool>)

Adds a But assertion that uses example data.

public ScenarioOutlineTerminal<TExample, T> But(string title, Func<T, TExample, bool> predicate)

Parameters

title string

The step title.

predicate Func<T, TExample, bool>

A predicate that receives the current value and example data.

Returns

ScenarioOutlineTerminal<TExample, T>

This terminal chain for further chaining.

Examples(params TExample[])

Specifies the example data rows to execute the scenario with.

public ScenarioOutlineTerminal<TExample, T> Examples(params TExample[] examples)

Parameters

examples TExample[]

The example data values.

Returns

ScenarioOutlineTerminal<TExample, T>

This terminal chain for execution.

RunAsync(CancellationToken)

Executes the scenario outline for all examples and returns the results.

public Task<ExamplesResult> RunAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Optional cancellation token.

Returns

Task<ExamplesResult>

The aggregated results from all example executions.