public void ShouldNotThrowExceptionWhenValid() { IAction action = new MessageAction() { Text = "Foo", Label = "Test" }; action.Validate(); }
public void ShouldThrowExceptionWhenTextIsNull() { IAction action = new MessageAction() { Label = "Test" }; ExceptionAssert.Throws <InvalidOperationException>("The text cannot be null.", () => { action.Validate(); }); }
public void ShouldThrowExceptionWhenLabelIsNull() { IAction action = new MessageAction() { Text = "Foo" }; ExceptionAssert.Throws <InvalidOperationException>("The label cannot be null.", () => { action.Validate(); }); }