public void When_the_request_has_no_upstream_header() { var response = Hydrator.MakeRequest("/candidate/ref/456", new HttpRequestMessage()); response.StatusCode.ShouldBe(HttpStatusCode.InternalServerError); //in-memory doesnt give you the full exception back? }
public void When_requesting_an_invalid_remote_url() { var response = Hydrator.MakeRequest("some/endpoint/789", BuildMessage(new HttpRequestMessage())); response.StatusCode.ShouldBe(HttpStatusCode.NotFound); Remote.Recieved.Count().ShouldBe(1); }
public void Without_a_hydrate_header() { var response = Hydrator.MakeRequest("/candidate/ref/456", BuildMessage(new HttpRequestMessage())); var body = response.Content.ReadAsStringAsync().Result; body.ShouldNotBeEmpty(); body.ShouldBe(Resource.PersonWithOneRef); }
public void When_handling_a_delete_with_type_only() { var response = Hydrator.MakeRequest( "/manage/statement", new HttpRequestMessage { Method = HttpMethod.Delete }); response.StatusCode.ShouldBe(HttpStatusCode.OK); }
public void When_handling_a_post_with_type_id_and_json() { var response = Hydrator.MakeRequest( "/manage/statement/abc", new HttpRequestMessage { Method = HttpMethod.Post, Content = new StringContent("") }); response.StatusCode.ShouldBe(HttpStatusCode.OK); }
public void When_handling_a_get_with_type_and_id() { var response = Hydrator.MakeRequest( "/manage/statement/abc", new HttpRequestMessage { Method = HttpMethod.Get }); response.StatusCode.ShouldBe(HttpStatusCode.OK); }