public void ShouldNotThrowExceptionWhenValid() { ISendMessage message = new VideoMessage() { PreviewUrl = new Uri("https://foo.previewUrl"), Url = new Uri("https://foo.url") }; message.Validate(); }
public void ShouldThrowExceptionWhenPreviewUrlIsNull() { ISendMessage message = new VideoMessage() { Url = new Uri("https://foo.url") }; ExceptionAssert.Throws <InvalidOperationException>("The preview url cannot be null.", () => { message.Validate(); }); }