예제 #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);
        }
예제 #2
0
 public AzureMessageQueueHealthCheck(IAzureMessageQueueHelper azureMessageQueueHelper,
                                     ISalesCatalogueStorageService scsStorageService,
                                     IOptions <EssFulfilmentStorageConfiguration> essFulfilmentStorageConfiguration,
                                     ILogger <AzureMessageQueueHelper> logger,
                                     IAzureBlobStorageService azureBlobStorageService)
 {
     this.azureMessageQueueHelper           = azureMessageQueueHelper;
     this.scsStorageService                 = scsStorageService;
     this.essFulfilmentStorageConfiguration = essFulfilmentStorageConfiguration;
     this.logger = logger;
     this.azureBlobStorageService = azureBlobStorageService;
 }
예제 #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;
 }
예제 #4
0
        public void Setup()
        {
            this.fakeAzureMessageQueueHelperClient = A.Fake <IAzureMessageQueueHelper>();
            this.fakeLogger = A.Fake <ILogger <AzureMessageQueueHelper> >();
            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"
            });

            azureMessageQueueHealthCheck = new AzureMessageQueueHealthCheck(fakeAzureMessageQueueHelperClient, fakeSalesCatalogueStorageService, fakeEssFulfilmentStorageConfiguration, fakeLogger, fakeAzureBlobStorageService);
        }