public ConnectionService(ForexMinerHeimdallrDbContext dbContext, IConnectionsSecretService connectionsSecretService, IMapper mapper, IOandaApiConnectionFactory oandaApiConnectionFactory) { _dbContext = dbContext; _connectionsSecretService = connectionsSecretService; _mapper = mapper; _oandaApiConnectionFactory = oandaApiConnectionFactory; }
/// <summary> /// Ticker service constructor /// Sets up the required service /// </summary> /// <param name="configuration">Configuration object</param> /// <param name="dbContext">Database context</param> /// <param name="httpClientFactory">Http client factory</param> /// <param name="mapper">Mapper service</param> public TickerService( IConfiguration configuration, ForexMinerHeimdallrDbContext dbContext, IHttpClientFactory httpClientFactory, IConnectionsSecretService connectionsSecretService, IMapper mapper, IOandaApiConnectionFactory oandaApiConnectionFactory, IInstrumentStorageService instrumentStorageService ) { _configuration = configuration; _dbContext = dbContext; _httpClientFactory = httpClientFactory; _retryPolicy = Policy.Handle <HttpRequestException>().RetryAsync(int.Parse(_configuration["forex-miner-thor:Max-Retries"])); _connectionsSecretService = connectionsSecretService; _mapper = mapper; _oandaApiConnectionFactory = oandaApiConnectionFactory; _instrumentStorageService = instrumentStorageService; }
public ConnectionsSecretServiceTests() { _secretClientMock = new Mock <SecretClient>(); _connectionsSecretService = new ConnectionsSecretService(_secretClientMock.Object); }
public DevelopmentConnectionsSecretServiceTests() { _cachingServiceMock = new Mock <ICachingService>(); _connectionsSecretService = new DevelopmentConnectionsSecretService(_cachingServiceMock.Object); }