Skip to content

Scenario Text Attribute

Tom Longhurst edited this page Apr 27, 2020 · 2 revisions

The [ScenarioText] attribute is designed for outputting a human readable description of what a test is doing.

Annotate your tests with a [ScenarioText] attribute and write a description of that test.

[Test]
[ScenarioText("Test that doing ### returns ###")]
public void Test1()
{
    Given(() => Action1())
        .When(() => Action2())
        .Then(() => Assertion1())
        .And(() => Assertion2())
        .BDTest();
}
Clone this wiki locally