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