public void Can_handle_GET_routes_with_a_single_parameter2() { using (var app = new TestApp()) { var context = new QuickContextSpy(); app.FindRouteFor(SupportedHttpMethod.GET, "/hi/bob").Handle(context); context.Response.ShouldEqual("Hello bob"); } }
public void Can_handle_GET_routes_with_a_single_parameter() { using (var app = new TestApp()) { var context = new Mock<IQuickContext>().Object; app.FindRouteFor(SupportedHttpMethod.GET, "/hi/bob").Handle(context); Mock.Get(context).Verify(cxt => cxt.Write("Hello bob")); } }