public void ShouldAddRouteIfProvidedWhenConfigureIsInvoked() { var route = new HttpRoute("testroute"); controller = new DummyController(); controller.ConfigureForTesting(request, "testroute", route); controller.Configuration.Routes.ShouldContain(route); }
public void ShouldSetRouteDataWithControllerInformationWhenConfigureIsInvoked() { controller = new DummyController(); var route = new HttpRoute("testroute"); controller.ConfigureForTesting(new HttpRequestMessage(), "testroute", route); var addedRoute = controller.Configuration.Routes["testroute"]; addedRoute.ShouldEqual(route); }
public void ShouldCreateRequestWhenConfigureIsInvokedPassingUriAndMethod() { controller.ConfigureForTesting(HttpMethod.Get, "http://localhost/test"); controller.Request.Method.ShouldEqual(HttpMethod.Get); controller.Request.RequestUri.AbsoluteUri.ShouldEqual("http://localhost/test"); }
public void TestFixtureSetUp() { request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/test"); controller = new DummyController(); controller.ConfigureForTesting(request); }