public void ShouldThrowExceptionWhenActionIsNull() { var column = new ImageCarouselColumn() { ImageUrl = new Uri("https://foo.bar"), }; ExceptionAssert.Throws <InvalidOperationException>("The action cannot be null.", () => { column.Validate(); }); }
public void ShouldThrowExceptionWhenImageUrlIsNull() { var column = new ImageCarouselColumn() { Action = new PostbackAction() }; ExceptionAssert.Throws <InvalidOperationException>("The image url cannot be null.", () => { column.Validate(); }); }
public void ShouldNotThrowExceptionWhenValid() { var column = new ImageCarouselColumn() { ImageUrl = new Uri("https://foo.bar"), Action = new PostbackAction() { Data = "Foo", Label = "Bar" } }; column.Validate(); }