public void ShouldNotThrowExceptionWhenValid() { var action = new ImagemapMessageAction() { Text = "test", Area = new ImagemapArea(1, 2, 3, 4) }; action.Validate(); }
public void ShouldThrowExceptionWhenAreaIsNull() { var action = new ImagemapMessageAction() { Text = "test" }; ExceptionAssert.Throws <InvalidOperationException>("The area cannot be null.", () => { action.Validate(); }); }
public void ShouldThrowExceptionWhenTextIsNull() { var action = new ImagemapMessageAction() { Area = new ImagemapArea(1, 2, 3, 4) }; ExceptionAssert.Throws <InvalidOperationException>("The text cannot be null.", () => { action.Validate(); }); }