Created
March 22, 2011 16:44
-
-
Save thecodejunkie/881542 to your computer and use it in GitHub Desktop.
Spike of Nancy test harness
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BrowserFixture | |
{ | |
private readonly Browser browser; | |
public BrowserFixture() | |
{ | |
var bootstrapper = | |
new FakeDefaultNancyBootstrapper(); | |
this.browser = new Browser(bootstrapper); | |
} | |
[Fact] | |
public void Should_just_work_got_damit() | |
{ | |
var response = browser.Get("/", (with) => { | |
with.Header("Content-Length", "0"); | |
with.Header("Accepted-Type", "text/plain"); | |
with.HttpRequest(); | |
}); | |
response.StatusCode.ShouldEqual(HttpStatusCode.OK); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment