Esempio n. 1
0
        public EnrichWithAppIdCommandMiddlewareTests()
        {
            A.CallTo(() => httpContextAccessor.HttpContext)
            .Returns(httpContext);

            sut = new EnrichWithAppIdCommandMiddleware(httpContextAccessor);
        }
        public EnrichWithAppIdCommandMiddlewareTests()
        {
            A.CallTo(() => httpContextAccessor.HttpContext)
            .Returns(httpContext);

            var appEntity = A.Fake <IAppEntity>();

            A.CallTo(() => appEntity.Id).Returns(appId.Id);
            A.CallTo(() => appEntity.Name).Returns(appId.Name);

            httpContext.Features.Set <IAppFeature>(new AppResolver.AppFeature(appEntity));

            sut = new EnrichWithAppIdCommandMiddleware(httpContextAccessor);
        }