public async Task SampleTest(xBDD.Core.TestRunBuilder testRunBuilder) { var run = xB.CurrentRun; xB.CurrentRun = testRunBuilder; await xB.AddScenario(this) .Run(); xB.CurrentRun = run; }
public async Task SampleTestWithSteps(xBDD.Core.TestRunBuilder testRunBuilder) { var run = xB.CurrentRun; xB.CurrentRun = testRunBuilder; var myValue = 0; await xB.AddScenario(this) .Given("You have 1", s => { myValue = 1; }) .When("you add 1", s => { myValue++; }) .Then("you will have 2", s => { Assert.AreEqual(2, myValue); }) .Run(); xB.CurrentRun = run; }