public void ShouldThrowExceptionWhenLabelIsNull() { IAction action = new DateTimePickerAction(DateTimePickerMode.Date); ExceptionAssert.Throws <InvalidOperationException>("The label cannot be null.", () => { action.Validate(); }); }
public void ShouldNotThrowExceptionWhenValid() { IAction action = new DateTimePickerAction(DateTimePickerMode.Date) { Label = "Foo", Data = "Bar" }; action.Validate(); }
public void ShouldThrowExceptionWhenDataIsNull() { IAction action = new DateTimePickerAction(DateTimePickerMode.Date) { Label = "PostbackLabel" }; ExceptionAssert.Throws <InvalidOperationException>("The data cannot be null.", () => { action.Validate(); }); }