Beispiel #1
0
        public void can_invoke_Application_with_many_middleware_and_they_run_in_the_right_order()
        {
            var ourMiddleware = Middleware.AllFromAssembly().Where(mw => mw.MethodFullName.Contains("MyMiddleware")).ToArray();
            var app           = new Application(Method("MyApp"));
            var response      = app.Invoke(new Request("hi", "there"), ourMiddleware);

            response.Text.ShouldEqual("GoFirst:Bar:GoesAfterBar:GoesBeforeAwesome:Awesome:GoLast:Called MyApp with: hi, there\n");
        }