Example #1
0
        public void Test_NeedsAzureStorageLogging_WithBuilderModelNullAndMessageGreaterThan1Mb()
        {
            AzureStorageBlobContainerBuilder azureStorageBlobContainerBuilder = null;
            var message = GenerateTestMessage(1024 * 1024);
            var result  = azureStorageBlobContainerBuilder.NeedsAzureStorageLogging(message, 1);

            Assert.AreEqual(AzureStorageLoggingCheckResult.LogWarningNoStorage, result);
        }
Example #2
0
        public void Test_NeedsAzureStorageLogging_WithMessageLessThanDefinedSize()
        {
            var azureStorageBlobContainerBuilder =
                new AzureStorageBlobContainerBuilder(new AzureStorageLogProviderOptions("https://test.com",
                                                                                        true,
                                                                                        resourcesFactory.SuccessTemplateMessage,
                                                                                        resourcesFactory.FailureTemplateMessage));
            var message = GenerateTestMessage(1024 * 512);
            var result  = azureStorageBlobContainerBuilder.NeedsAzureStorageLogging(message, 1);

            Assert.AreEqual(AzureStorageLoggingCheckResult.NoLogging, result);
        }
Example #3
0
        public void Test_NeedsAzureStorageLogging_WithBuilderModelNotNullAndMessageGreaterThan1Mb()
        {
            var azureStorageBlobContainerBuilder =
                new AzureStorageBlobContainerBuilder(new AzureStorageLogProviderOptions("https://test.com",
                                                                                        true,
                                                                                        resourcesFactory.SuccessTemplateMessage,
                                                                                        resourcesFactory.FailureTemplateMessage));
            var message = GenerateTestMessage(1024 * 1024);
            var result  = azureStorageBlobContainerBuilder.NeedsAzureStorageLogging(message, 1);

            Assert.AreEqual(AzureStorageLoggingCheckResult.LogWarningAndStoreMessage, result);
        }