Example #1
0
 public StockConsumerController(
     IQueueIntegration queueIntegration,
     IStockFileInfoIntegration stockInfoIntegration,
     ILogger <StockConsumerController> logger)
 {
     _logger = logger;
     _stockInfoIntegration = stockInfoIntegration;
     _queueIntegration     = queueIntegration;
 }
        public StockConsumerControllerTests()
        {
            _stockFileInfoIntegration = Mock.Create <IStockFileInfoIntegration>();
            _queueIntegration         = Mock.Create <IQueueIntegration>();
            _logger     = Mock.Create <ILogger <StockConsumerController> >();
            _controller = new StockConsumerController(_queueIntegration, _stockFileInfoIntegration, _logger);

            // Prevent any posts in RabbitMq
            Mock.Arrange(() => _queueIntegration.PostMessage(Arg.AnyString)).DoInstead(() => { });
        }