public void Should_set_path_on_descriptions_that_are_passed_to_resolver() { // Given var request = new Request("POST", "/", new Dictionary<string, IEnumerable<string>>(), new MemoryStream()); var r = new FakeRouteResolver(); var e = new NancyEngine(this.locator, r); A.CallTo(() => this.locator.GetModules()).Returns(this.modules); // When e.HandleRequest(request); // Then r.Path.ShouldEqual("/"); }
public void Should_set_path_on_descriptions_that_are_passed_to_resolver() { // Given var request = new Request("POST", "/"); var r = new FakeRouteResolver(); var e = new NancyEngine( r, this.application); A.CallTo(() => this.application.ModuleMetas).Returns(this.modules); // When e.HandleRequest(request); // Then r.Path.ShouldEqual("/"); }
public void Should_set_action_on_descriptions_that_are_passed_to_resolver() { // Given var request = new Request("POST", "/", new Dictionary<string, IEnumerable<string>>(), new MemoryStream()); var r = new FakeRouteResolver(); var e = new NancyEngine(this.locator, r); A.CallTo(() => this.locator.GetModules()).Returns(this.modules); var expectedAction = (new FakeNancyModuleWithBasePath()).Post["/"]; // When e.HandleRequest(request); // Then r.Action.ShouldBeSameAs(expectedAction); }
public void Should_set_base_route_on_descriptions_that_are_passed_to_resolver() { // Given var request = new Request("POST", "/"); var r = new FakeRouteResolver(); var e = new NancyEngine(this.locator, r); A.CallTo(() => this.locator.GetModules()).Returns(this.modules); // When e.HandleRequest(request); // Then r.ModulePath.ShouldEqual("/fake"); }