Created
June 3, 2014 15:27
-
-
Save KevM/bb75705bc6d2c19ec7eb to your computer and use it in GitHub Desktop.
FubuMVC Integration testing
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
| [Test] | |
| public void home_endpoint_should_return_document_specifications() | |
| { | |
| using (var server = new WebApplication().BuildApplication().RunEmbedded()) | |
| { | |
| var results = server.Endpoints.Get<HomeEndpoint>(x => x.Execute(new HomeRequest())) | |
| .ReadAsJson<SpecificationListViewModel>(); | |
| results.SpecificationDocumentCount.ShouldBeGreaterThan(0); | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Secret sauce to get this working:
The next trick was figuring out that
RunEmbedded()really just wanted my web application's FubuApplication instance (created by my implementation of IFubuApplication.)