public ButtonService(IOptions <ButtonServiceOptions> config, IEventRestService eventRestService, IAzureServiceBusClient azureBusManagerClient, IServiceBusClient serviceBus, ILogger <ButtonService> logger) { _config = config.Value; _logger = logger; _eventRestService = eventRestService; _azureBusManagerClient = azureBusManagerClient; _serviceBus = serviceBus; }
public ButtonServiceFixture() { ButtonServiceOptions buttonOptionsTTL = new ButtonServiceOptions() { PushToQueueTimeToLive = 60 }; ButtonServiceOptions buttonOptionsNoTTL = new ButtonServiceOptions() { PushToQueueTimeToLive = 0 }; _mockButtonOptionsTTL = new Mock <IOptions <ButtonServiceOptions> >(MockBehavior.Strict); _mockButtonOptionsNoTTL = new Mock <IOptions <ButtonServiceOptions> >(MockBehavior.Strict); _mockButtonOptionsTTL.Setup(ap => ap.Value).Returns(buttonOptionsTTL); _mockButtonOptionsNoTTL.Setup(ap => ap.Value).Returns(buttonOptionsNoTTL); }