public void Pass_Without_Invalid_Condition(string step) { // Act var exception = Record.Exception(() => StepCheckerTested.AssertCalledAfter(step, Condition.Valid)); // Assert Check.That(exception) .IsNull(); }
public void Throw_InvalidOperationException_With_Invalid_Condition(string step) { // Act var exception = Record.Exception(() => StepCheckerTested.AssertCalledAfter(step, Condition.Invalid)); // Assert Check.That(exception) .IsNotNull() .And.IsInstanceOf <InvalidOperationException>(); }
public void Throw_InvalidOperationException_With_First_Step() { // Act var exception = Record.Exception(() => StepCheckerTested.AssertCalledAfter(StepName.Step1, Condition.Valid)); // Assert Check.That(exception) .IsNotNull() .And.IsInstanceOf <InvalidOperationException>(); }
public void Throw_InvalidOperationException_With_Unknown_Step(bool invalidCondition) { // Act var exception = Record.Exception(() => StepCheckerTested.AssertCalledAfter(StepName.Unknown, invalidCondition)); // Assert Check.That(exception) .IsNotNull() .And.IsInstanceOf <InvalidOperationException>(); }