39 references to
Aspire.Hosting.Azure (5)
Provisioning\Internal\DefaultProvisioningContextProvider.cs (5)
117var subscriptionInput = validationContext.Inputs[SubscriptionIdName]; 123var resourceGroupInput = validationContext.Inputs[ResourceGroupName]; 136_options.Location = result.Data[LocationName].Value; 137_options.SubscriptionId = result.Data[SubscriptionIdName].Value; 138_options.ResourceGroup = result.Data[ResourceGroupName].Value;
Aspire.Hosting.Azure.Tests (6)
DefaultProvisioningContextProviderTests.cs (6)
316inputsInteraction.Inputs[DefaultProvisioningContextProvider.LocationName].Value = inputsInteraction.Inputs[0].Options!.First(kvp => kvp.Key == "westus").Value; 317inputsInteraction.Inputs[DefaultProvisioningContextProvider.SubscriptionIdName].Value = "12345678-1234-1234-1234-123456789012"; 318inputsInteraction.Inputs[DefaultProvisioningContextProvider.ResourceGroupName].Value = "rg-myrg"; 367inputsInteraction.Inputs[DefaultProvisioningContextProvider.LocationName].Value = inputsInteraction.Inputs[0].Options!.First(kvp => kvp.Key == "westus").Value; 368inputsInteraction.Inputs[DefaultProvisioningContextProvider.SubscriptionIdName].Value = "not a guid"; 369inputsInteraction.Inputs[DefaultProvisioningContextProvider.ResourceGroupName].Value = "invalid group";
Aspire.Hosting.Tests (28)
InteractionServiceTests.cs (28)
427Assert.Equal("Username", collection["Username"].Label); 428Assert.Equal("Password", collection["Password"].Label); 429Assert.Equal("Remember Me", collection["RememberMe"].Label); 474Assert.Equal("User Name", collection["UserName"].Label); 475Assert.Equal("Email Address", collection["EmailAddress"].Label); 476Assert.Null(collection["Age"].Label); // No label specified, should use EffectiveLabel 477Assert.Equal("Age", collection["Age"].EffectiveLabel); 503Assert.Equal("Explicit", collection["ExplicitName"].Label); 504Assert.Equal("Another", collection["AnotherExplicit"].Label); 505Assert.Equal("Generated Label", collection["GeneratedLabel"].Label); 561Assert.NotNull(collection["Input1"]); 562Assert.NotNull(collection["Input2"]); 563Assert.NotNull(collection["Input3"]); 566Assert.Equal("Input1", collection["Input1"].EffectiveLabel); 567Assert.Equal("Input2", collection["Input2"].EffectiveLabel); 568Assert.Equal("Input3", collection["Input3"].EffectiveLabel); 594Assert.NotNull(collection[name]); 598Assert.Equal("!@#$%^&*()", collection["SpecialInput"].Label); 599Assert.Equal("!@#$%^&*()", collection["SpecialInput"].EffectiveLabel); 601Assert.Equal("", collection["EmptyLabel"].Label); 602Assert.Equal("EmptyLabel", collection["EmptyLabel"].EffectiveLabel); // Falls back to name 604Assert.Equal(" ", collection["WhitespaceLabel"].Label); 605Assert.Equal("WhitespaceLabel", collection["WhitespaceLabel"].EffectiveLabel); // Falls back to name 619var exception = Assert.Throws<KeyNotFoundException>(() => collection["Invalid"]); 654Assert.Equal("testuser", resultCollection["Username"].Value); 655Assert.Equal("testpass", resultCollection["Password"].Value); 684var emailInput = context.Inputs["Email"]; 685var ageInput = context.Inputs["Age"];