public void can_instantiate_with_status_and_body() { var response = new Response(404, "Didn't find this"); response.Status.ShouldEqual(404); response.Body.ShouldEqual("Didn't find this"); response.Headers.Should(Be.Empty); }
public void can_instantiate_with_status_and_headers() { var response = new Response(302, new Dictionary<string,string> {{"Location","/foo"}}); response.Status.ShouldEqual(302); response.Body.ShouldEqual(""); response.Headers.ShouldEqual(new Dictionary<string,string> {{"Location","/foo"}}); }
public void can_instantiate_with_status() { var response = new Response(400); response.Status.ShouldEqual(400); response.Body.ShouldEqual(""); response.Headers.Should(Be.Empty); }
public static Response FromHttpResponse(string httpResponseText) { var response = new Response(); response.LoadHttpResponse(httpResponseText); return response; }