unit_test library

Classes

And<SUT, Example extends UnitExample?>
Implementation of a UnitStep that logs a 'Gherkin' -> 'And' step.
But<SUT, Example extends UnitExample?>
Implementation of an UnitStep that logs a 'Gherkin' -> 'But' step.
Given<SUT, Example extends UnitExample?>
Implementation of a UnitStep that logs a 'Gherkin' -> 'Given' step.
GivenWhenThen<SUT, Example extends UnitExample?>
Implementation of an UnitStep that logs a 'Gherkin' -> 'Give', 'When' and 'Then' step.
Should<SUT, Example extends UnitExample?>
Implementation of an UnitStep that discards the 'Gherkin' notation and tells us directly what the code should do.
Then<SUT, Example extends UnitExample?>
Implementation of an UnitStep that logs a 'Gherkin' -> 'Then' step.
UnitBox
Used to store data that stays persistent over several UnitSteps inside a UnitScenario.
UnitExample
Used to define 'Scenario Outline' examples.
UnitFeature<SUT>
Used to specify and test a list of UnitScenario.
UnitMocks
Used to store mocks that stay persistent throughout the whole UnitScenario.
UnitScenario<SUT, Example extends UnitExample?>
Used to hold and test a list of UnitStep.
UnitStep<SUT, Example extends UnitExample?>
Used to represents a step inside a UnitScenario.
UnitTest<SUT>
Used to hold and test a list of UnitFeature.
When<SUT, Example extends UnitExample?>
Implementation of an UnitStep that logs a 'Gherkin' -> 'When' step.
WhenThen<SUT, Example extends UnitExample?>
Implementation of an UnitStep that logs a 'Gherkin' -> 'When' and 'Then' step.

Extensions

StepResultExtension on Object?
Helpful but dangerous casting method to allow for easier usage of a UnitStep result.
UnitExampleExtension on UnitExample?

Typedefs

UnitStepCallback<SUT, Example extends UnitExample?> = FutureOr<void> Function(SUT systemUnderTest, UnitLog log, UnitBox box, UnitMocks mocks, [Example? example])
Callback used to provide the necessary tools to execute a UnitStep.