public void Given_A_Test_With_A_Critical_Assert_Step_With_Assert_Options_Defined_Which_Retries_The_Test_At_An_Action_Which_Is_Not_Part_Of_The_Test_When_The_Test_Is_Executed_Then_The_Test_Fails_Due_To_Incorrect_Configuration() { Assert.That(() => EndToEndTestJourney <TestContext> .Given(_ => { }) .When(_ => { }) .ThenCritically(_ => Assert.That(0, Is.EqualTo(1)), new CriticalAssertOptionsBuilder <TestContext>().RetryTestUponFailure(3, TimeSpan.FromSeconds(1), SomeStepIsExecuted).Build()) .RunTest(), Throws.InvalidOperationException); }
public void Given_A_Test_With_Multiple_Steps_When_The_Test_Is_Executed_Then_A_New_Context_Is_Created_And_Passed_To_Every_Step() { TestContext context = null; EndToEndTestJourney <TestContext> .Given(c => { Assert.That(c, Is.Not.Null); context = c; }) .When(c => Assert.That(c, Is.EqualTo(context))) .Then(c => Assert.That(c, Is.EqualTo(context))) .AndCritically(c => Assert.That(c, Is.EqualTo(context))) .RunTest(); }