Created
August 1, 2013 16:26
-
-
Save derwolfe/6132962 to your computer and use it in GitHub Desktop.
This file contains 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
using Nancy; | |
using Nancy.Testing; | |
using Xunit; | |
using df_nancy.Modules.api; | |
namespace df_tests.ApiTests | |
{ | |
public class PositionApiTests | |
{ | |
[Fact] | |
public void Visits_root_successfully() | |
{ | |
// given | |
var bootstrapper = new ConfigurableBootstrapper(with => | |
{ | |
with.Module<PositionsApi>() // how to pass in the data dependency? | |
}); | |
// need to add a fake/mock for _positionsData and GetAll(); | |
var browser = new Browser(bootstrapper); | |
// when | |
var result = browser.Get("/api/positions/current", with => | |
{ | |
with.HttpRequest(); | |
}); | |
// then | |
// can't find the template | |
Assert.Equal(HttpStatusCode.OK, result.StatusCode); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment