public void Should_be_able_to_hit_endpoint() { string url = ConfigurationManager.AppSettings["Application.BaseUrl"]; string output = new HttpGetResolver().Resolve(new Uri(url+"/home"), "GET", new WebHeaderCollection()); Console.WriteLine(output); Assert.That(output, Is.Not.Null); }
public void Should_get_unauthorized_with_correct_challenge_header_if_no_creds_provided_on_delete() { string url = ConfigurationManager.AppSettings["Application.BaseUrl"]; var httpGetResolver = new HttpGetResolver(); var webHeaderCollection = new WebHeaderCollection(); HttpWebResponse response = httpGetResolver.ResolveAsResponse(new Uri(url + "/voucher/1"), "DELETE", webHeaderCollection); Assert.That(response.StatusCode, Is.EqualTo(HttpStatusCode.Unauthorized)); Assert.That(response.GetResponseHeader("WWW-Authenticate"), Is.StringStarting("OAuth realm=\"")); }