コード例 #1
0
 public HttpRequesterMiddlewareTests()
 {
     _requester     = new Mock <IHttpRequester>();
     _loggerFactory = new Mock <IOcelotLoggerFactory>();
     _logger        = new Mock <IOcelotLogger>();
     _loggerFactory.Setup(x => x.CreateLogger <HttpRequesterMiddleware>()).Returns(_logger.Object);
     _next       = context => Task.CompletedTask;
     _middleware = new HttpRequesterMiddleware(_next, _loggerFactory.Object, _requester.Object);
 }
コード例 #2
0
 public HttpRequesterMiddlewareTests()
 {
     _requester     = new Mock <IHttpRequester>();
     _loggerFactory = new Mock <IOcelotLoggerFactory>();
     _logger        = new Mock <IOcelotLogger>();
     _loggerFactory.Setup(x => x.CreateLogger <HttpRequesterMiddleware>()).Returns(_logger.Object);
     _next       = async context => {
         //do nothing
     };
     _middleware = new HttpRequesterMiddleware(_next, _loggerFactory.Object, _requester.Object);
 }