public void ForRequest_should_return_204_for_request_with_unit_response() { // Given var bootstrapper = new Bootstrapper(); var browser = new Browser(bootstrapper); // When var result = browser.Put("/testmessage", with => { with.HttpRequest(); }); // Then result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.NoContent); }
public void ForRequest_should_return_200_for_request_with_response() { // Given var bootstrapper = new Bootstrapper(); var browser = new Browser(bootstrapper); // When var result = browser.Get("/testmessagewithresponse", with => { with.HttpRequest(); }); // Then result.StatusCode.ShouldBeEquivalentTo(HttpStatusCode.OK); result.Body.AsString().ShouldBeEquivalentTo("Testing"); }