public void Should_have_constructor_with_error_message() { var expectedMessage = "Message"; var target = new ValidationException(expectedMessage); Assert.That(target, Is.Not.Null); Assert.That(target.Message, Is.EqualTo(expectedMessage)); }
public void Should_have_constructor_with_error_message_and_inner_exception() { var expectedMessage = "Message"; var expectedInnerException = new Exception("Inner Message"); var target = new ValidationException(expectedMessage, expectedInnerException); Assert.That(target, Is.Not.Null); Assert.That(target.Message, Is.EqualTo(expectedMessage)); Assert.That(target.InnerException, Is.SameAs(expectedInnerException)); }
public void Should_have_empty_constructor() { var target = new ValidationException(); Assert.That(target, Is.Not.Null); }