public void SetMessageInConstructor() { // get new instance var instance = new CannotRemoveException(TestMessage); // asserts whether the test exception//s message is equal to the test message Assert.AreEqual(TestMessage, instance.Message); }
public void CreateNewCannotRemoveException() { // create a new instance var exception = new CannotRemoveException(TestMessage); // test that it//s been instantiated Assert.IsNotNull(exception); // asserts whether the test exception//s message is equal to the test message Assert.AreEqual(TestMessage, exception.Message); }