Esempio n. 1
0
        public static async Task <AzureGenerator> SetupTemplateGenerator(AzureContext azureContext)
        {
            ITelemetryProvider telemetryProvider = new FakeTelemetryProvider();
            AzureGenerator     azureGenerator    = new AzureGenerator(azureContext.LogProvider, azureContext.StatusProvider);

            return(azureGenerator);
        }
Esempio n. 2
0
        public static async Task <AzureGenerator> SetupTemplateGenerator(AzureContext azureContext)
        {
            ITelemetryProvider telemetryProvider = new FakeTelemetryProvider();
            AzureGenerator     azureGenerator    = new AzureGenerator(azureContext.LogProvider, azureContext.StatusProvider);

            // For Tests, we'll set the target subscription of the Azure Generator to the Azure Context provided by the AzureContext
            azureGenerator.TargetSubscription = azureContext.AzureSubscription;

            return(azureGenerator);
        }
Esempio n. 3
0
        public static void SetupObjects(out FakeAsmRetriever asmRetreiver, out TemplateGenerator templateGenerator)
        {
            ILogProvider       logProvider       = new FakeLogProvider();
            IStatusProvider    statusProvider    = new FakeStatusProvider();
            ITelemetryProvider telemetryProvider = new FakeTelemetryProvider();
            ITokenProvider     tokenProvider     = new FakeTokenProvider();

            asmRetreiver      = new FakeAsmRetriever(logProvider, statusProvider);
            templateGenerator = new TemplateGenerator(logProvider, statusProvider, telemetryProvider, tokenProvider, asmRetreiver);
        }
Esempio n. 4
0
        public static TemplateGenerator SetupTemplateGenerator(AzureContext azureContext)
        {
            ITelemetryProvider telemetryProvider = new FakeTelemetryProvider();

            return(new TemplateGenerator(azureContext.LogProvider, azureContext.StatusProvider, telemetryProvider, azureContext.SettingsProvider));
        }
Esempio n. 5
0
        public static async Task <AsmToArmGenerator> SetupTemplateGenerator(AzureContext azureContext)
        {
            ITelemetryProvider telemetryProvider = new FakeTelemetryProvider();

            return(new AsmToArmGenerator(TestHelper.GetTestAzureSubscription(), TestHelper.GetTestAzureSubscription(), await TestHelper.GetTargetResourceGroup(azureContext), azureContext.LogProvider, azureContext.StatusProvider, telemetryProvider, azureContext.SettingsProvider));
        }