Step

A step structure. Creating a Step will automatically be added to the current step as a child The steps can be nested to allow you to group steps as with meanigful names.

The steps ends when the Struct is destroyed. In order to have a step that represents a method assign it to a local variable

Constructors

this
this()
Undocumented in source.
this
this(string name)

Create and attach a step

Destructor

~this
~this()

Mark the test as finished

Members

Static variables

suite
string suite;

The current suite name. Do not alter this global variable

test
string test;

The current test name. Do not alter this global variable

Examples

void TestSetup() @system
{
  auto aStep = Step("Given some precondition");

  Step("Some setup");
  performSomeSetup();

  Step("Other setup");
  performOtherSetup();
}
// will create this tree:
// Test
//  |
//  +- Given some precondition
//        |
//        +- Some setup
//        +- Other setup

Meta