public void ShouldHaveActionActionAvailableThroughProperty_WhenExpectingAnException() { WhenLastActionDeferred(Exploding); ThenLastAction.Should().NotBeNull(); ThenLastAction.Should().Throw <Exception>("Did I do that?"); }
public void ShouldThrowException_WhenCreatingIEnumerable_GivenDidNotCallPrepare() { Given.HowMany = 10; WhenLastActionDeferred(CreatingIEnumerable); ThenLastAction.Should().Throw <InvalidOperationException>(); }
public void ShouldNotThrowException_WhenPreparing() { WhenLastActionDeferred(Preparing); ThenLastAction.Should().NotThrow(); }
public void ShouldThrowException_WhenCreatingModel_GivenDidNotCallPrepare() { WhenLastActionDeferred(CreatingModel); ThenLastAction.Should().Throw <InvalidOperationException>(); }