コード例 #1
0
        public CorrelationIdHeaderMiddlewareTests()
        {
            _innerFunction = Substitute.For <IDummyRequestDelegate>();
            _next          = async(context) =>
            {
                _innerFunction.CallMe(context);
                await Task.CompletedTask;
            };

            _middleware = new CorrelationIdHeaderMiddleware(_next);
        }
コード例 #2
0
        public ExceptionHandlingMiddlewareTests()
        {
            _innerFunction = Substitute.For <IDummyRequestDelegate>();
            _next          = async(context) =>
            {
                await _innerFunction.CallMe(context);

                await Task.CompletedTask;
            };

            _middleware = Substitute.ForPartsOf <ExceptionHandlingMiddleware>(_next);
        }