Esempio n. 1
0
 void Ex10()
 {
     Given("ThenStep that has an assertion with Exception that returns boolean", () => Step = FixtureSteps.CreateThenStep(new Action <Exception>(exc => throw new Exception())));
     Given("a result of GivenStep that does not have an exception", () => StepResults.Add(FixtureStepResult.Of(FixtureSteps.CreateGivenStep()).Passed().Build()));
     Given("a result of WhenStep that has an exception", () => StepResults.Add(FixtureStepResult.Of(FixtureSteps.CreateWhenStep()).Failed(new Exception()).Build()));
     When("the given ThenStep is run", () => RunnerOf(Step).Run(StepResults).Build());
     Then("the status of the result of the latest WhenStep should be Passed", () => StepResults.GetLatestStepResultsOf <WhenStep>().First().Status == FixtureStepStatus.Passed);
     Then("the exception of the result of the latest WhenStep should be null", () => StepResults.GetLatestStepResultsOf <WhenStep>().First().Exception == null);
 }