public void Webhook_Should_Throw_Error_If_Webhook_ToFormContent_Called_Before_Setting__Required_IdType() { var webhook = new Webhook(); webhook.AppendUrl(new Uri(@"https://example.com")); Assert.Throws <InvalidOperationException>(() => { webhook.ToFormContent(); }); }
public void Webhook_Should_Have_Not_Empty_Urls_When_Url_Is_Appended(string url) { var webhook = new Webhook(); var uri = new Uri(url); webhook.AppendUrl(uri); Assert.NotEmpty(webhook.Urls); }
public void Webhook_Should_Throw_Error_If_More_Than_Three_URLs_Appended() { var webhook = new Webhook(); Assert.Throws <InvalidOperationException>(() => { webhook.AppendUrl(new Uri(@"https://example1.sample.com")) .AppendUrl(new Uri(@"https://example2.sample.com")) .AppendUrl(new Uri(@"https://example3.sample.com")) .AppendUrl(new Uri(@"https://example4.sample.com")); }); }