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 ExchangeSetCleanUpService(IAzureFileSystemHelper azureFileSystemHelper,
                                  IOptions <EssFulfilmentStorageConfiguration> storageConfig,
                                  ISalesCatalogueStorageService scsStorageService,
                                  IConfiguration configuration,
                                  ILogger <ExchangeSetCleanUpService> logger,
                                  IOptions <CleanUpConfiguration> cleanUpConfig)
 {
     this.azureFileSystemHelper = azureFileSystemHelper;
     this.storageConfig         = storageConfig;
     this.scsStorageService     = scsStorageService;
     this.configuration         = configuration;
     this.logger        = logger;
     this.cleanUpConfig = cleanUpConfig;
 }
Exemplo n.º 8
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.º 9
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.º 10
0
        public void Setup()
        {
            fakeAzureFileSystemHelper = A.Fake <IAzureFileSystemHelper>();
            fakeStorageConfig         = Options.Create(new EssFulfilmentStorageConfiguration()
            {
                StorageContainerName = "Test"
            });
            fakeScsStorageService = A.Fake <ISalesCatalogueStorageService>();
            fakeConfiguration     = A.Fake <IConfiguration>();
            fakeLogger            = A.Fake <ILogger <ExchangeSetCleanUpService> >();
            fakeCleanUpConfig     = Options.Create(new CleanUpConfiguration()
            {
                NumberOfDays = 1
            });

            exchangeSetCleanUpService = new ExchangeSetCleanUpService(fakeAzureFileSystemHelper, fakeStorageConfig, fakeScsStorageService, fakeConfiguration, fakeLogger, fakeCleanUpConfig);
        }
Exemplo n.º 11
0
        public void Setup()
        {
            fakeScsStorageService       = A.Fake <ISalesCatalogueStorageService>();
            fakeAzureBlobStorageService = A.Fake <IAzureBlobStorageService>();
            fakeQueryFssService         = A.Fake <IFulfilmentFileShareService>();
            fakeLogger                   = A.Fake <ILogger <FulfilmentDataService> >();
            fakeConfiguration            = A.Fake <IConfiguration>();
            fakeFulfilmentAncillaryFiles = A.Fake <IFulfilmentAncillaryFiles>();
            fakeFulfilmentDataService    = A.Fake <IFulfilmentDataService>();
            fakeFileShareServiceConfig   = Options.Create(new FileShareServiceConfiguration()
            {
                BaseUrl                 = "http://tempuri.org",
                CellName                = "DE260001",
                EditionNumber           = "1",
                Limit                   = 10,
                Start                   = 0,
                ProductCode             = "AVCS",
                ProductLimit            = 4,
                UpdateNumber            = "0",
                UpdateNumberLimit       = 10,
                ParallelSearchTaskCount = 10,
                EncRoot                 = "ENC_ROOT",
                ExchangeSetFileFolder   = "V01X01",
                Info            = "INFO",
                ProductFileName = "TEST.TXT",
                CatalogFileName = "CATALOG.031",
                CommentVersion  = "VERSION=1.0"
            });
            fakeEssFulfilmentStorageConfiguration = Options.Create(new EssFulfilmentStorageConfiguration()
            {
                QueueName = "", StorageAccountKey = "", StorageAccountName = "", StorageContainerName = ""
            });
            fakeFulfilmentSalesCatalogueService = A.Fake <IFulfilmentSalesCatalogueService>();
            fakeFulfilmentCallBackService       = A.Fake <IFulfilmentCallBackService>();
            fakeMonitorHelper = A.Fake <IMonitorHelper>();

            fulfilmentDataService = new FulfilmentDataService(fakeAzureBlobStorageService, fakeQueryFssService, fakeLogger, fakeFileShareServiceConfig, fakeConfiguration, fakeFulfilmentAncillaryFiles, fakeFulfilmentSalesCatalogueService, fakeFulfilmentCallBackService, fakeMonitorHelper);
        }