public Task ItShouldContainRequestContextAndAnHttpContextBaseWhenCalledThroughRoute()
        {
            var routes = new RouteCollection();

            routes.MapOwinPath <AppDelegate>(string.Empty, WasCalledApp);
            RequestContext requestContext = NewRequestContext(routes, NewHttpContext(new Uri("http://localhost")));

            Task task = ExecuteRequestContext(requestContext);

            return(task.ContinueWith(
                       _ =>
            {
                task.Exception.ShouldBe(null);
                WasCalled.ShouldBe(true);
                WasCalledInput.ShouldContainKeyAndValue(typeof(RequestContext).FullName, requestContext);
                WasCalledInput.ShouldContainKey(typeof(HttpContextBase).FullName);
            }));
        }
        public Task ItShouldContainAllOwinStandardKeys()
        {
            var routes = new RouteCollection();

            routes.MapOwinPath <AppDelegate>(string.Empty, WasCalledApp);
            RequestContext requestContext = NewRequestContext(routes, NewHttpContext(new Uri("http://localhost")));

            Task task = ExecuteRequestContext(requestContext);

            return(task.ContinueWith(
                       _ =>
            {
                task.Exception.ShouldBe(null);
                WasCalled.ShouldBe(true);
                WasCalledInput.ShouldContainKey("owin.RequestMethod");
                WasCalledInput.ShouldContainKey("owin.RequestPath");
                WasCalledInput.ShouldContainKey("owin.RequestPathBase");
                WasCalledInput.ShouldContainKey("owin.RequestQueryString");
                WasCalledInput.ShouldContainKey("owin.RequestScheme");
                WasCalledInput.ShouldContainKey("owin.Version");
            }));
        }