Exemplo n.º 1
0
        public void Setup()
        {
            fakeScsStorageService = A.Fake <ISalesCatalogueStorageService>();
            fakeStorageConfig     = Options.Create(new EssFulfilmentStorageConfiguration()
            {
                QueueName                    = "",
                StorageAccountKey            = "",
                StorageAccountName           = "",
                StorageContainerName         = "",
                DynamicQueueName             = "ess-{0}-test",
                LargeExchangeSetAccountKey   = "LargeExchangeSetAccountKey",
                LargeExchangeSetAccountName  = "LargeExchangeSetAccountName",
                LargeExchangeSetInstance     = 2,
                LargeExchangeSetSizeInMB     = 300,
                MediumExchangeSetAccountKey  = "MediumExchangeSetAccountKey",
                MediumExchangeSetAccountName = "MediumExchangeSetAccountName",
                MediumExchangeSetInstance    = 3,
                SmallExchangeSetAccountKey   = "SmallExchangeSetAccountKey",
                SmallExchangeSetAccountName  = "SmallExchangeSetAccountName",
                SmallExchangeSetInstance     = 2,
                SmallExchangeSetSizeInMB     = 50
            });

            fakeAzureMessageQueueHelper = A.Fake <IAzureMessageQueueHelper>();
            fakeLogger = A.Fake <ILogger <AzureBlobStorageService> >();
            fakeAzureBlobStorageClient    = A.Fake <IAzureBlobStorageClient>();
            fakeSmallExchangeSetInstance  = A.Fake <ISmallExchangeSetInstance>();
            fakeMediumExchangeSetInstance = A.Fake <IMediumExchangeSetInstance>();
            fakeLargeExchangeSetInstance  = A.Fake <ILargeExchangeSetInstance>();

            azureBlobStorageService = new AzureBlobStorageService(fakeScsStorageService, fakeStorageConfig,
                                                                  fakeAzureMessageQueueHelper, fakeLogger, fakeAzureBlobStorageClient, fakeSmallExchangeSetInstance,
                                                                  fakeMediumExchangeSetInstance, fakeLargeExchangeSetInstance);
        }
Exemplo n.º 2
0
 public AzureBlobStorageHealthCheck(IAzureBlobStorageClient azureBlobStorageClient,
                                    ISalesCatalogueStorageService scsStorageService,
                                    IOptions <EssFulfilmentStorageConfiguration> essFulfilmentStorageConfiguration,
                                    ILogger <AzureBlobStorageService> logger,
                                    IAzureBlobStorageService azureBlobStorageService)
 {
     this.azureBlobStorageClient            = azureBlobStorageClient;
     this.scsStorageService                 = scsStorageService;
     this.essFulfilmentStorageConfiguration = essFulfilmentStorageConfiguration;
     this.logger = logger;
     this.azureBlobStorageService = azureBlobStorageService;
 }
Exemplo n.º 3
0
 public AzureBlobStorageService(ISalesCatalogueStorageService scsStorageService, IOptions <EssFulfilmentStorageConfiguration> storageConfig,
                                IAzureMessageQueueHelper azureMessageQueueHelper, ILogger <AzureBlobStorageService> logger, IAzureBlobStorageClient azureBlobStorageClient,
                                ISmallExchangeSetInstance smallExchangeSetInstance, IMediumExchangeSetInstance mediumExchangeSetInstance,
                                ILargeExchangeSetInstance largeExchangeSetInstance)
 {
     this.scsStorageService       = scsStorageService;
     this.storageConfig           = storageConfig;
     this.azureMessageQueueHelper = azureMessageQueueHelper;
     this.logger = logger;
     this.azureBlobStorageClient    = azureBlobStorageClient;
     this.smallExchangeSetInstance  = smallExchangeSetInstance;
     this.mediumExchangeSetInstance = mediumExchangeSetInstance;
     this.largeExchangeSetInstance  = largeExchangeSetInstance;
 }
Exemplo n.º 4
0
        public void Setup()
        {
            fakeAzureBlobStorageClient  = A.Fake <IAzureBlobStorageClient>();
            fakeAzureStorageService     = A.Fake <ISalesCatalogueStorageService>();
            fakeAzureTableStorageClient = A.Fake <IAzureTableStorageClient>();
            fakeCacheConfiguration      = A.Fake <IOptions <CacheConfiguration> >();
            fakeEnterpriseEventCacheDataRequestValidator = A.Fake <IEnterpriseEventCacheDataRequestValidator>();
            fakeLogger = A.Fake <ILogger <EssWebhookService> >();
            fakeEssFulfilmentStorageConfig = A.Fake <IOptions <EssFulfilmentStorageConfiguration> >();
            fakeCacheConfiguration.Value.CacheBusinessUnit = "ADDS";
            fakeCacheConfiguration.Value.CacheProductCode  = "AVCS";

            service = new EssWebhookService(fakeAzureTableStorageClient, fakeAzureStorageService, fakeAzureBlobStorageClient, fakeEnterpriseEventCacheDataRequestValidator, fakeCacheConfiguration, fakeLogger, fakeEssFulfilmentStorageConfig);
        }
Exemplo n.º 5
0
        public void Setup()
        {
            this.fakeAzureBlobStorageClient = A.Fake <IAzureBlobStorageClient>();
            this.fakeLogger = A.Fake <ILogger <AzureBlobStorageService> >();
            this.fakeSalesCatalogueStorageService = A.Fake <ISalesCatalogueStorageService>();
            this.fakeAzureBlobStorageService      = A.Fake <IAzureBlobStorageService>();

            this.fakeEssFulfilmentStorageConfiguration = Options.Create(new EssFulfilmentStorageConfiguration()
            {
                QueueName = "testessdevqueue", StorageAccountKey = "testaccountkey", StorageAccountName = "testessdevstorage", StorageContainerName = "testContainer", DynamicQueueName = "testDynamicQueue", ExchangeSetTypes = "test"
            });

            azureBlobStorageHealthCheck = new AzureBlobStorageHealthCheck(fakeAzureBlobStorageClient, fakeSalesCatalogueStorageService, fakeEssFulfilmentStorageConfiguration, fakeLogger, fakeAzureBlobStorageService);
        }
Exemplo n.º 6
0
 public FileShareServiceCache(IAzureBlobStorageClient azureBlobStorageClient,
                              IAzureTableStorageClient azureTableStorageClient,
                              ILogger <FileShareServiceCache> logger,
                              ISalesCatalogueStorageService azureStorageService,
                              IOptions <CacheConfiguration> fssCacheConfiguration,
                              IFileSystemHelper fileSystemHelper)
 {
     this.azureBlobStorageClient  = azureBlobStorageClient;
     this.azureTableStorageClient = azureTableStorageClient;
     this.logger = logger;
     this.azureStorageService   = azureStorageService;
     this.fssCacheConfiguration = fssCacheConfiguration;
     this.fileSystemHelper      = fileSystemHelper;
 }
Exemplo n.º 7
0
        public void Setup()
        {
            fakeAzureBlobStorageClient  = A.Fake <IAzureBlobStorageClient>();
            fakeAzureTableStorageClient = A.Fake <IAzureTableStorageClient>();
            fakeLogger = A.Fake <ILogger <FileShareServiceCache> >();
            fakeAzureStorageService = A.Fake <ISalesCatalogueStorageService>();
            fakeCacheConfiguration  = A.Fake <IOptions <CacheConfiguration> >();
            fakeFileSystemHelper    = A.Fake <IFileSystemHelper>();
            fakeCacheConfiguration.Value.CacheStorageAccountKey  = "testaccountkey";
            fakeCacheConfiguration.Value.CacheStorageAccountName = "testessstorage";
            fakeCacheConfiguration.Value.FssSearchCacheTableName = "testfsscache";
            fakeCacheConfiguration.Value.IsFssCacheEnabled       = true;

            fileShareServiceCache = new FileShareServiceCache(fakeAzureBlobStorageClient, fakeAzureTableStorageClient, fakeLogger, fakeAzureStorageService, fakeCacheConfiguration, fakeFileSystemHelper);
        }
Exemplo n.º 8
0
 public EssWebhookService(IAzureTableStorageClient azureTableStorageClient,
                          ISalesCatalogueStorageService azureStorageService,
                          IAzureBlobStorageClient azureBlobStorageClient,
                          IEnterpriseEventCacheDataRequestValidator enterpriseEventCacheDataRequestValidator,
                          IOptions <CacheConfiguration> cacheConfiguration,
                          ILogger <EssWebhookService> logger,
                          IOptions <EssFulfilmentStorageConfiguration> essFulfilmentStorageconfig)
 {
     this.azureTableStorageClient = azureTableStorageClient;
     this.azureStorageService     = azureStorageService;
     this.azureBlobStorageClient  = azureBlobStorageClient;
     this.enterpriseEventCacheDataRequestValidator = enterpriseEventCacheDataRequestValidator;
     this.cacheConfiguration         = cacheConfiguration;
     this.logger                     = logger;
     this.essFulfilmentStorageconfig = essFulfilmentStorageconfig;
 }
Exemplo n.º 9
0
 public AzureFileSystemHelper(IAzureBlobStorageClient azureBlobStorageClient,
                              ILogger <AzureFileSystemHelper> logger)
 {
     this.azureBlobStorageClient = azureBlobStorageClient;
     this.logger = logger;
 }