48 references to
Aspire.Hosting.Azure (14)
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (9)
180_options.SubscriptionId = result.Data[SubscriptionIdName].Value; 203var subscriptionInput = validationContext.Inputs[SubscriptionIdName]; 215_options.SubscriptionId = manualResult.Data[SubscriptionIdName].Value; 301var resourceGroupInput = validationContext.Inputs[ResourceGroupName]; 313_options.Location = result.Data[LocationName].Value; 314_options.ResourceGroup = result.Data[ResourceGroupName].Value; 352var resourceGroupInput = validationContext.Inputs[ResourceGroupName]; 364_options.Location = manualResult.Data[LocationName].Value; 365_options.ResourceGroup = manualResult.Data[ResourceGroupName].Value;
Provisioning\Internal\RunModeProvisioningContextProvider.cs (5)
145var subscriptionInput = validationContext.Inputs[SubscriptionIdName]; 151var resourceGroupInput = validationContext.Inputs[ResourceGroupName]; 164_options.Location = result.Data[LocationName].Value; 165_options.SubscriptionId = result.Data[SubscriptionIdName].Value; 166_options.ResourceGroup = result.Data[ResourceGroupName].Value;
Aspire.Hosting.Azure.Tests (6)
ProvisioningContextProviderTests.cs (6)
302inputsInteraction.Inputs[BaseProvisioningContextProvider.LocationName].Value = inputsInteraction.Inputs[0].Options!.First(kvp => kvp.Key == "westus").Value; 303inputsInteraction.Inputs[BaseProvisioningContextProvider.SubscriptionIdName].Value = "12345678-1234-1234-1234-123456789012"; 304inputsInteraction.Inputs[BaseProvisioningContextProvider.ResourceGroupName].Value = "rg-myrg"; 351inputsInteraction.Inputs[BaseProvisioningContextProvider.LocationName].Value = inputsInteraction.Inputs[0].Options!.First(kvp => kvp.Key == "westus").Value; 352inputsInteraction.Inputs[BaseProvisioningContextProvider.SubscriptionIdName].Value = "not a guid"; 353inputsInteraction.Inputs[BaseProvisioningContextProvider.ResourceGroupName].Value = "invalid group";
Aspire.Hosting.Tests (28)
InteractionServiceTests.cs (28)
445Assert.Equal("Username", collection["Username"].Label); 446Assert.Equal("Password", collection["Password"].Label); 447Assert.Equal("Remember Me", collection["RememberMe"].Label); 492Assert.Equal("User Name", collection["UserName"].Label); 493Assert.Equal("Email Address", collection["EmailAddress"].Label); 494Assert.Null(collection["Age"].Label); // No label specified, should use EffectiveLabel 495Assert.Equal("Age", collection["Age"].EffectiveLabel); 521Assert.Equal("Explicit", collection["ExplicitName"].Label); 522Assert.Equal("Another", collection["AnotherExplicit"].Label); 523Assert.Equal("Generated Label", collection["GeneratedLabel"].Label); 579Assert.NotNull(collection["Input1"]); 580Assert.NotNull(collection["Input2"]); 581Assert.NotNull(collection["Input3"]); 584Assert.Equal("Input1", collection["Input1"].EffectiveLabel); 585Assert.Equal("Input2", collection["Input2"].EffectiveLabel); 586Assert.Equal("Input3", collection["Input3"].EffectiveLabel); 612Assert.NotNull(collection[name]); 616Assert.Equal("!@#$%^&*()", collection["SpecialInput"].Label); 617Assert.Equal("!@#$%^&*()", collection["SpecialInput"].EffectiveLabel); 619Assert.Equal("", collection["EmptyLabel"].Label); 620Assert.Equal("EmptyLabel", collection["EmptyLabel"].EffectiveLabel); // Falls back to name 622Assert.Equal(" ", collection["WhitespaceLabel"].Label); 623Assert.Equal("WhitespaceLabel", collection["WhitespaceLabel"].EffectiveLabel); // Falls back to name 637var exception = Assert.Throws<KeyNotFoundException>(() => collection["Invalid"]); 672Assert.Equal("testuser", resultCollection["Username"].Value); 673Assert.Equal("testpass", resultCollection["Password"].Value); 702var emailInput = context.Inputs["Email"]; 703var ageInput = context.Inputs["Age"];