public static Nancy.Testing.BrowserResponse Delete(this Nancy.Testing.Browser browser, string route) { return(browser.Delete(route, with => { with.HttpRequest(); })); }
public static Nancy.Testing.BrowserResponse Get(this Nancy.Testing.Browser browser, string route) { return(browser.Get(route, with => { with.HttpRequest(); with.Header("accept", "application/json"); })); }
public static Nancy.Testing.BrowserResponse Post(this Nancy.Testing.Browser browser, string route, string bodyContent) { return(browser.Post(route, with => { with.HttpRequest(); with.Header("accept", "application/json"); with.Header("Content-Type", "application/json"); with.Body(bodyContent); })); }
public void Hello_world_route_should_return_httpstatus_200() { var browser = new Nancy.Testing.Browser(new Nancy.DefaultNancyBootstrapper()); var response = browser.Get("/1", (with) => with.HttpRequest()); Assert.Equal(HttpStatusCode.OK, response.StatusCode); }