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(() => { }); }
public ChatController( IHubContext <ChatHub> hubContext, IQueueIntegration queueIntegration, IChatConfiguration configuration, ILogger <ChatController> logger) { _queueIntegration = queueIntegration; _allowedCommands = configuration.AllowedCommands; _broadCastMessageMethodName = configuration.BroadCastMethodName; _hubContext = hubContext; _logger = logger; }
public ChatControllerTests() { _hubContext = Mock.Create <IHubContext <ChatHub> >(); _logger = Mock.Create <ILogger <ChatController> >(); _queueIntegration = Mock.Create <IQueueIntegration>(); _configuration = Mock.Create <IChatConfiguration>(); Mock.Arrange(() => _configuration.AllowedCommands).Returns( new System.Collections.Generic.HashSet <string> { "/STOCK" }); _controller = new ChatController(_hubContext, _queueIntegration, _configuration, _logger); }