コード例 #1
0
            public void ShouldThrowExceptionWhenActionIsNull()
            {
                var column = new ImageCarouselColumn()
                {
                    ImageUrl = new Uri("https://foo.bar"),
                };

                ExceptionAssert.Throws <InvalidOperationException>("The action cannot be null.", () =>
                {
                    column.Validate();
                });
            }
コード例 #2
0
            public void ShouldThrowExceptionWhenImageUrlIsNull()
            {
                var column = new ImageCarouselColumn()
                {
                    Action = new PostbackAction()
                };

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

                column.Validate();
            }