Example #1
0
        public void Test_Build_WithNullOptions()
        {
            var azureOptionsModel = new AzureStorageBlobContainerBuilder(null);

            azureOptionsModel.Build();
            Assert.IsNull(azureOptionsModel.AzureStorageLogProviderOptions);
            Assert.IsNull(azureOptionsModel.BlobContainerClient);
        }
Example #2
0
        public void Test_Build_WithOptions()
        {
            var azureOptionsModel =
                new AzureStorageBlobContainerBuilder(new AzureStorageLogProviderOptions("https://test.com",
                                                                                        true,
                                                                                        resourcesFactory.SuccessTemplateMessage,
                                                                                        resourcesFactory.FailureTemplateMessage));

            azureOptionsModel.Build();
            Assert.NotNull(azureOptionsModel.AzureStorageLogProviderOptions);
            Assert.NotNull(azureOptionsModel.BlobContainerClient);
        }
Example #3
0
        public EventHubClientWrapper(string eventHubConnectionString, string eventHubEntityPath, AzureStorageLogProviderOptions azureStorageLogProviderOptions)
        {
            var connectionStringBuilder = new EventHubsConnectionStringBuilder(eventHubConnectionString)
            {
                EntityPath = eventHubEntityPath
            };

            eventHubClient = EventHubClient.CreateFromConnectionString(connectionStringBuilder.ToString());
            var azureStorageBlobContainerBuilder = new AzureStorageBlobContainerBuilder(azureStorageLogProviderOptions);

            azureStorageBlobContainerBuilder.Build();
            this.AzureStorageBlobContainerBuilder = azureStorageBlobContainerBuilder;
        }