Skip to main content

Getting Started

Test specification happens according to the Given-When-Then pattern.

Mental model

Test steps are not immediately executed when called! They are compiled into a state machine, where transition depends on the specified conditions.

The states are linked in a chain:

[Start] -> [First] -> [Second] -> [Third] -> [Final]

The test passes, if the Final state was reached before a timeout.

Given

Xcepto.Given introduces a specification environment based on a scenario.

XceptoTest.Given(scenario, builder =>
{
// Declare test behaviour here
}

Scenario classes specify instructions to setup and prepare the system under test.