示例#1
0
            public void ShouldNotThrowExceptionWhenValid()
            {
                ISendMessage message = new VideoMessage()
                {
                    PreviewUrl = new Uri("https://foo.previewUrl"),
                    Url        = new Uri("https://foo.url")
                };

                message.Validate();
            }
示例#2
0
            public void ShouldThrowExceptionWhenPreviewUrlIsNull()
            {
                ISendMessage message = new VideoMessage()
                {
                    Url = new Uri("https://foo.url")
                };

                ExceptionAssert.Throws <InvalidOperationException>("The preview url cannot be null.", () =>
                {
                    message.Validate();
                });
            }