public EnvironmentSeedCommand( AppSettings settings, IPortalService portal, IHSSupplierCommand supplierCommand, IHSBuyerCommand buyerCommand, IHSBuyerLocationCommand buyerLocationCommand, IOrderCloudClient oc, IExchangeRatesCommand exhangeRates ) { _settings = settings; _portal = portal; _supplierCommand = supplierCommand; _buyerCommand = buyerCommand; _buyerLocationCommand = buyerLocationCommand; _oc = oc; _exhangeRates = exhangeRates; var translationsConfig = new BlobServiceConfig() { ConnectionString = _settings.BlobSettings.ConnectionString, Container = _settings.BlobSettings.ContainerNameTranslations }; _translationsBlob = new OrderCloudIntegrationsBlobService(translationsConfig); }
public void Setup() { mockBlob = Substitute.For <IOrderCloudIntegrationsBlobService>(); //mockBlob.Get().ReturnsForAnyArgs(Serializ) _command = new ExchangeRatesCommand(mockBlob, new PerBaseUrlFlurlClientFactory(), new MockCachingService()); }
public void Setup() { _http = new HttpTest(); _http.RespondWith(@"{'rates':{'CAD':1.5231,'HKD':8.3693,'ISK':157.5,'PHP':54.778,'DKK':7.4576,'HUF':354.7,'CZK':27.589,'AUD':1.6805,'RON':4.84,'SEK':10.6695,'IDR':16127.82,'INR':81.9885,'BRL':6.3172,'RUB':79.6208,'HRK':7.5693,'JPY':115.53,'THB':34.656,'CHF':1.0513,'SGD':1.5397,'PLN':4.565,'BGN':1.9558,'TRY':7.4689,'CNY':7.6759,'NOK':11.0568,'NZD':1.8145,'ZAR':20.0761,'USD':1.0798,'MXN':25.8966,'ILS':3.8178,'GBP':0.88738,'KRW':1332.6,'MYR':4.6982},'base':'EUR','date':'2020-05-15'}"); //_http.RespondWith(@"{'rates':{'MYR':4.6982},'base':'EUR','date':'2020-05-15'}"); _blob = Substitute.For <IOrderCloudIntegrationsBlobService>(); _command = new ExchangeRatesCommand(_blob, new PerBaseUrlFlurlClientFactory(), new MockCachingService()); }
public OrchestrationCommand(AppSettings settings, LogQuery log) { _settings = settings; _blobQueue = new OrderCloudIntegrationsBlobService(new BlobServiceConfig() { #if DEBUG ConnectionString = "UseDevelopmentStorage=true", #else ConnectionString = settings.BlobSettings.ConnectionString, #endif Container = settings.BlobSettings.ContainerNameQueue }); _blobCache = new OrderCloudIntegrationsBlobService(new BlobServiceConfig() { #if DEBUG ConnectionString = "UseDevelopmentStorage=true", #else ConnectionString = settings.BlobSettings.ConnectionString, #endif Container = settings.BlobSettings.ContainerNameCache }); _log = log; }
public GlobalExceptionHandler(BlobServiceConfig blobconfig) { _blob = new OrderCloudIntegrationsBlobService(blobconfig); }
public ExchangeRatesCommand(IOrderCloudIntegrationsBlobService blob, IFlurlClientFactory flurlFactory, IAppCache cache) { _client = new OrderCloudIntegrationsExchangeRatesClient(flurlFactory); _blob = blob; _cache = cache; }
public AssetClient(IOrderCloudIntegrationsBlobService blob, AppSettings settings) { _blob = blob; _settings = settings; }