public void ShouldNotThrowExceptionWhenValid() { IAction action = new PostbackAction() { Data = "PostbackData", Label = "PostbackLabel" }; action.Validate(); }
public void ShouldThrowExceptionWhenTextIsNull() { IAction action = new PostbackAction() { Label = "PostbackLabel" }; ExceptionAssert.Throws <InvalidOperationException>("The data cannot be null.", () => { action.Validate(); }); }
public void ShouldThrowExceptionWhenLabelIsNull() { IAction action = new PostbackAction() { Data = "PostbackData" }; ExceptionAssert.Throws <InvalidOperationException>("The label cannot be null.", () => { action.Validate(); }); }