Ejemplo n.º 1
0
        public void SetUp()
        {
            routeCollection = A.Fake<IRouteCollection>();
            outputWriter = A.Fake<IOutputWriter>();
            requestGraph = A.Fake<IRequestGraph>();
            prePipelineCollection = A.Fake<IPrePipelineCollection>();
            postPipelineCollection = A.Fake<IPostPipelineCollection>();

            endpoint = A.Fake<IEndpoint>();
            request = A.Fake<IRequest>();
            route = A.Fake<IRoute>();
            requestChain = A.Fake<IRequestChain>();
            response = A.Fake<IResponse>();

            serviceContainer = A.Fake<IServiceContainer>();

            A.CallTo(() => route.Endpoint).Returns(endpoint);
            A.CallTo(() => routeCollection.Resolve(request)).Returns(route);
            A.CallTo(() => requestGraph.FindChainFor(endpoint)).Returns(requestChain);
            A.CallTo(() => outputWriter.CreateResponse()).Returns(response);

            engine = new UWebEngine(routeCollection, requestGraph, serviceContainer, prePipelineCollection, postPipelineCollection);
        }