public void given_value_and_predicate_that_succeeds_when_verifying_should_not_throw_exception() { var value = new Person() { FirstName = "Todd", LastName = "Meinershagen" }; Action action = () => value.Verify(x => x.LastName == "Meinershagen"); action.ShouldNotThrow(); }
public void given_value_and_predicate_that_fails_when_verifying_should_throw_exception_with_standard_message() { var value = new Person() { FirstName = "Todd", LastName = "Meinershagen" }; Action action = () => value.Verify(x => x.LastName == "Barson"); action.ShouldThrow <VerificationException>().WithMessage("Unable to verify custom verification."); }