public void UnitTestGetWindowsAzurePackageConfiguration()
        {
            ConfigSectionConfigurationSource configSectionConfigurationSource = new ConfigSectionConfigurationSource();
            PackageConfiguration             packageConfiguration             = configSectionConfigurationSource.GetWindowsAzurePackageConfiguration("myArbitraryPackageName");

            Assert.IsNotNull(packageConfiguration);
        }
        public void UnitTestGetWindowsAzureSubscriptionConfiguration()
        {
            ConfigSectionConfigurationSource configSectionConfigurationSource = new ConfigSectionConfigurationSource();
            SubscriptionConfiguration        subscriptionConfiguration        = configSectionConfigurationSource.GetWindowsAzureSubscriptionConfiguration("myArbitraryAzureSubscriptionName");

            Assert.IsNotNull(subscriptionConfiguration);
        }
        public void UnitTestGetWindowsAzureStorageAccountConfiguration()
        {
            ConfigSectionConfigurationSource configSectionConfigurationSource = new ConfigSectionConfigurationSource();
            StorageAccountConfiguration      storageAccountConfiguration      = configSectionConfigurationSource.GetWindowsAzureStorageAccountConfiguration("myStorageAccountName");

            Assert.IsNotNull(storageAccountConfiguration);
        }
        public void UnitTestGetWhiteListConfiguration()
        {
            ConfigSectionConfigurationSource configSectionConfigurationSource = new ConfigSectionConfigurationSource();
            WhiteListConfiguration           whiteListConfiguration           = configSectionConfigurationSource.GetWindowsAzureHostedServiceWhiteListConfiguration();

            Assert.AreEqual(true, whiteListConfiguration.IncludeDeploymentCreateServices);
            Assert.AreEqual(true, whiteListConfiguration.IncludeDeploymentDeleteServices);
            Assert.AreEqual(true, whiteListConfiguration.IncludeHorizontalScaleServices);
            Assert.AreEqual(60, whiteListConfiguration.PollingIntervalInMinutes);
            Assert.AreEqual(2, whiteListConfiguration.Services.Count);

            // Test 1st service
            Assert.AreEqual("myAzureServiceName1", whiteListConfiguration.Services[0].Name);
            Assert.AreEqual(2, whiteListConfiguration.Services[0].Roles.Count);
            Assert.AreEqual(1, whiteListConfiguration.Services[0].Roles[0].MaxInstanceCount);
            Assert.AreEqual(InstanceSize.Medium, whiteListConfiguration.Services[0].Roles[0].MaxInstanceSize);
            Assert.AreEqual(2, whiteListConfiguration.Services[0].Roles[1].MaxInstanceCount);
            Assert.AreEqual(InstanceSize.ExtraSmall, whiteListConfiguration.Services[0].Roles[1].MaxInstanceSize);

            // Test 2nd service
            Assert.AreEqual("myAzureServiceName2", whiteListConfiguration.Services[1].Name);
            Assert.AreEqual(1, whiteListConfiguration.Services[1].Roles.Count);
            Assert.IsNull(whiteListConfiguration.Services[1].Roles[0].MaxInstanceCount);
            Assert.IsNull(whiteListConfiguration.Services[1].Roles[0].MaxInstanceSize);
        }
        public void UnitTestGetAllSubscriptionConfigurations()
        {
            ConfigSectionConfigurationSource configSectionConfigurationSource = new ConfigSectionConfigurationSource();

            SubscriptionConfiguration[] allSubscriptionConfigurations = configSectionConfigurationSource.GetAllWindowsAzureSubscriptionConfigurations();
            Assert.AreEqual(1, allSubscriptionConfigurations.Length);
        }
        public void UnitTestGetWindowsAzureDeploymentCreateConfigurations()
        {
            ConfigSectionConfigurationSource configSectionConfigurationSource = new ConfigSectionConfigurationSource();

            DeploymentCreateConfiguration[] deploymentCreateConfigurations = configSectionConfigurationSource.GetWindowsAzureDeploymentCreateConfigurations();
            Assert.AreEqual(1, deploymentCreateConfigurations.Length);
            Assert.AreEqual(1, deploymentCreateConfigurations[0].Schedules.Count);
            Assert.AreEqual(5, deploymentCreateConfigurations[0].Schedules[0].Days.Count);
        }
        public void UnitTestGetWindowsAzureBlobContainerDeleteConfigurations()
        {
            ConfigSectionConfigurationSource configSectionConfigurationSource = new ConfigSectionConfigurationSource();

            BlobContainerDeleteConfiguration[] blobContainerDeleteConfigurations = configSectionConfigurationSource.GetWindowsAzureBlobContainerDeleteConfigurations();
            Assert.AreEqual(1, blobContainerDeleteConfigurations.Length);
            Assert.AreEqual(2, blobContainerDeleteConfigurations[0].BlobContainerNames.Count);
            Assert.AreEqual(3, blobContainerDeleteConfigurations[0].Schedules.Count);
            Assert.AreEqual(5, blobContainerDeleteConfigurations[0].Schedules[0].Days.Count);
            Assert.AreEqual(5, blobContainerDeleteConfigurations[0].Schedules[1].Days.Count);
            Assert.AreEqual(2, blobContainerDeleteConfigurations[0].Schedules[2].Days.Count);
        }
        public void UnitTestGetWindowsAzureTableDeleteConfigurations()
        {
            ConfigSectionConfigurationSource configSectionConfigurationSource = new ConfigSectionConfigurationSource();

            TableDeleteConfiguration[] tableDeleteConfigurations = configSectionConfigurationSource.GetWindowsAzureTableDeleteConfigurations();
            Assert.AreEqual(1, tableDeleteConfigurations.Length);
            Assert.AreEqual(2, tableDeleteConfigurations[0].TableNames.Count);
            Assert.AreEqual(3, tableDeleteConfigurations[0].Schedules.Count);
            Assert.AreEqual(5, tableDeleteConfigurations[0].Schedules[0].Days.Count);
            Assert.AreEqual(5, tableDeleteConfigurations[0].Schedules[1].Days.Count);
            Assert.AreEqual(2, tableDeleteConfigurations[0].Schedules[2].Days.Count);
        }
        public void UnitTestGetWindowsAzureScheduledHorizontalScaleConfigurations()
        {
            ConfigSectionConfigurationSource configSectionConfigurationSource = new ConfigSectionConfigurationSource();

            ScheduledHorizontalScaleConfiguration[] scheduledHorizontalScaleConfigurations = configSectionConfigurationSource.GetWindowsAzureScheduledHorizontalScaleConfigurations();
            Assert.AreEqual(2, scheduledHorizontalScaleConfigurations.Length);
            Assert.AreEqual(1, scheduledHorizontalScaleConfigurations[1].HorizontalScales.Count);
            Assert.AreEqual(3, scheduledHorizontalScaleConfigurations[1].Schedules.Count);
            Assert.AreEqual(5, scheduledHorizontalScaleConfigurations[1].Schedules[0].Days.Count);
            Assert.AreEqual(5, scheduledHorizontalScaleConfigurations[1].Schedules[1].Days.Count);
            Assert.AreEqual(2, scheduledHorizontalScaleConfigurations[1].Schedules[2].Days.Count);
        }