-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
CraigRice edited this page Aug 22, 2023
·
7 revisions
https://www.nuget.org/packages/BddPipe/
using BddPipe;
using static BddPipe.Runner;
[Test]
public void Add_TwoPositiveNumbers_ValueIsCorrect()
{
Scenario()
.Given("two numbers", () => new { A = 5, B = 10 })
.When("the numbers are summed", setup => setup.A + setup.B)
.Then("sum should be as expected", result =>
{
Assert.AreEqual(15, result);
})
.Run();
}
Note: You can return anything from each step.
Important: Steps must end with a call to .Run() or .RunAsync() otherwise the result is not evaluated.
Scenario: Add_TwoPositiveNumbers_ValueIsCorrect
Given two numbers [Passed]
When the numbers are summed [Passed]
Then sum should be as expected [Passed]