1404 references to Parse
aspire (1)
Completions\CompletionInvocation.cs (1)
58
return WriteCompletions(command.
Parse
(args[1]).GetCompletions(position), output);
Aspire.Cli.Tests (1398)
CliBootstrapTests.cs (2)
468
var parseResult = command.
Parse
(commandLine);
489
var parseResult = command.
Parse
("ls");
Commands\AddCommandTests.cs (80)
166
.
Parse
($"add --apphost \"{appHostFile.FullName}\"{versionOption}")
376
.
Parse
($"add {integrationArgument} --apphost \"{appHostFile.FullName}\"").InvokeAsync().DefaultTimeout();
490
.
Parse
($"{commandLine} --apphost \"{appHostFile.FullName}\"")
583
.
Parse
($"add --apphost \"{appHostFile.FullName}\"").InvokeAsync().DefaultTimeout();
614
var exitCode = await provider.GetRequiredService<AddCommand>().
Parse
(commandLine).InvokeAsync().DefaultTimeout();
656
.
Parse
(commandLine).InvokeAsync().DefaultTimeout();
729
.
Parse
($"add Contoso.Hosting.One --apphost \"{appHostFile.FullName}\" --version 1.0.0").InvokeAsync().DefaultTimeout();
822
.
Parse
($"add {id} --apphost \"{appHostFile.FullName}\" --version 1.0.0").InvokeAsync().DefaultTimeout();
888
.
Parse
($"add Acme.Hosting.Redis --apphost \"{appHostFile.FullName}\" --version 1.0.0").InvokeAsync().DefaultTimeout();
952
.
Parse
($"add Aspire.Hosting.Redis --apphost \"{appHostFile.FullName}\" --version 1.0.0")
1132
.
Parse
($"add {packageId} --apphost \"{appHostFile.FullName}\" --version 1.0.0")
1248
.
Parse
($"add Acme.Hosting.Redis --apphost \"{appHostFile.FullName}\"{versionArgument}").InvokeAsync().DefaultTimeout();
1271
var result = command.
Parse
("add --help");
1285
var result = command.
Parse
("integration add --help");
1314
var result = command.
Parse
("integration search redis --json");
1345
var result = command.
Parse
("integration search --format json");
1423
var result = command.
Parse
("integration list --format json");
1471
var result = command.
Parse
(commandLine);
1496
var result = command.
Parse
("integration list");
1546
var result = command.
Parse
("integration search redis --format json");
1592
var result = command.
Parse
("integration search rdis --format json");
1679
var result = command.
Parse
($"integration search redis --apphost \"{appHostFile.FullName}\" --format json");
1751
var result = command.
Parse
($"integration search redis --apphost \"{appHostFile.FullName}\" --format json");
1838
var result = command.
Parse
($"integration search foundry --apphost \"{appHostFile.FullName}\" --format json");
1933
var result = command.
Parse
($"integration search redis --apphost \"{appHostFile.FullName}\" --format json");
2015
var result = command.
Parse
($"{commandText} --apphost \"{appHostFile.FullName}\" --format json");
2064
var result = command.
Parse
($"integration search redis --apphost \"{appHostFile.FullName}\" --format json");
2147
var result = command.
Parse
($"integration search foundry --apphost \"{appHostFile.FullName}\" --format json");
2205
var result = command.
Parse
("integration list --format json");
2258
var result = command.
Parse
("integration search azure --format json");
2342
var result = command.
Parse
("add");
2420
var result = command.
Parse
("add docker");
2503
var result = command.
Parse
("add docker --version 9.2.0");
2583
var result = command.
Parse
("add docker --version 9.2.0");
2658
var result = command.
Parse
("add redis --version 13.2.0");
2727
var result = command.
Parse
("add redis --version 13.2.0");
2818
var result = command.
Parse
("add redis --version 13.2.0");
2889
var result = command.
Parse
($"add {integrationName}");
2963
var result = command.
Parse
("add redis --version 13.2.0");
3038
var result = command.
Parse
("add --version 13.2.0");
3109
var result = command.
Parse
("add --version 13.2.0");
3179
var result = command.
Parse
("add redis --version 13.2.0");
3256
var result = command.
Parse
("add redis --version 13.2.0");
3340
var result = command.
Parse
("add red");
3428
var result = command.
Parse
($"add redis --source {expectedSource}");
3454
var result = command.
Parse
($"add redis --source {source}");
3489
var result = command.
Parse
("add");
3564
var result = command.
Parse
("add nonexistentpackage");
4006
var result = command.
Parse
($"add {packageId} --apphost \"{appHostFile.FullName}\"");
4075
.
Parse
($"{commandLine} --apphost \"{appHostFile.FullName}\"")
4147
var result = command.
Parse
($"add Aspire.Hosting.Azure.Storage --apphost \"{appHostFile.FullName}\"");
4205
var result = command.
Parse
("add redis");
4273
var result = command.
Parse
("add redis");
4520
var result = command.
Parse
("add redis");
4589
var result = command.
Parse
("add redis");
4639
var result = command.
Parse
($"add Aspire.Hosting.Foo --apphost \"{appHostFile.FullName}\"");
4699
var result = command.
Parse
($"add {integrationName} --apphost \"{appHostFile.FullName}\"{sourceArgument}");
4749
var result = command.
Parse
($"add redis --apphost \"{appHostFile.FullName}\" --source ./feed");
4810
var result = command.
Parse
($"add Aspire.Hosting.Redis --apphost \"{appHostFile.FullName}\"");
4862
var result = command.
Parse
($"add Aspire.Hosting.Foo --all --apphost \"{appHostFile.FullName}\"");
4908
var result = command.
Parse
($"integration list --apphost \"{appHostFile.FullName}\" --format json");
4956
var result = command.
Parse
($"integration list --apphost \"{appHostFile.FullName}\"");
5003
var result = command.
Parse
($"integration list --apphost \"{appHostFile.FullName}\"");
5052
var result = command.
Parse
($"integration search zzznomatch --apphost \"{appHostFile.FullName}\"");
5110
var result = command.
Parse
($"add Aspire.Hosting.Foo --apphost \"{appHostFile.FullName}\"");
5164
var result = command.
Parse
($"add Aspire.Hosting.Redis --apphost \"{appHostFile.FullName}\"");
5210
var result = command.
Parse
($"integration list --apphost \"{appHostFile.FullName}\" --format json");
5376
var result = command.
Parse
("add postgre");
5443
var result = command.
Parse
("add kube");
5496
var result = command.
Parse
("add kubernetes");
5553
var result = command.
Parse
("add kube");
5622
var result = command.
Parse
(integrationName is null ? "add" : $"add {integrationName}");
5677
var result = command.
Parse
("add postgre --version 9.2.0");
5729
var result = command.
Parse
("add nonexistentpackage --version 9.2.0");
5815
var result = command.
Parse
("add sql");
5896
var result = command.
Parse
("add sql --version 13.2.0");
5979
var result = command.
Parse
("add sql --version 13.2.0");
6067
var result = command.
Parse
("add nonexistentpackage --version 13.2.0");
6154
var result = command.
Parse
("add nonexistentpackage --version 13.2.0");
6231
var result = command.
Parse
("add azureapp");
Commands\AgentInitClientSelectionTests.cs (48)
38
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init --skills aspire --mcp=false");
91
var result = provider.GetRequiredService<RootCommand>().
Parse
(
145
var result = provider.GetRequiredService<RootCommand>().
Parse
(
171
var result = provider.GetRequiredService<RootCommand>().
Parse
(
199
var result = command.
Parse
($"agent init {options}");
213
var result = provider.GetRequiredService<RootCommand>().
Parse
($"agent init --scope {value}");
229
var result = provider.GetRequiredService<RootCommand>().
Parse
($"{command} --agent copilot");
250
var result = root.
Parse
($"{command} --agents {selection}");
255
var rejected = root.
Parse
($"{command} --agents copilot");
260
root.
Parse
($"{command} --agents ").GetCompletions().Select(item => item.Label).Order(StringComparer.Ordinal));
273
var result = provider.GetRequiredService<RootCommand>().
Parse
(
309
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init --skills all --mcp");
346
var result = provider.GetRequiredService<RootCommand>().
Parse
(
385
var result = provider.GetRequiredService<RootCommand>().
Parse
(
433
var result = provider.GetRequiredService<RootCommand>().
Parse
(
517
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init");
566
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init");
604
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init");
616
var result = provider.GetRequiredService<RootCommand>().
Parse
(
645
var result = provider.GetRequiredService<RootCommand>().
Parse
($"agent init --agents all --scope {scope} --skills none --mcp");
671
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init --agents copilot,claude --skills none --mcp");
690
var result = provider.GetRequiredService<RootCommand>().
Parse
($"agent init --agents {client} --scope {scope} --skills none --mcp");
719
var result = provider.GetRequiredService<RootCommand>().
Parse
(
741
var result = command.
Parse
($"agent init --agents {client} --skills none --mcp");
770
var result = provider.GetRequiredService<RootCommand>().
Parse
(
815
var result = provider.GetRequiredService<RootCommand>().
Parse
(
878
var result = provider.GetRequiredService<RootCommand>().
Parse
(
914
var result = provider.GetRequiredService<RootCommand>().
Parse
(
940
var result = provider.GetRequiredService<RootCommand>().
Parse
(
994
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1033
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1060
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init --agents opencode --scope global --skills none --mcp");
1098
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init --agents all --scope global --skills none --mcp");
1132
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1161
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1193
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1246
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1278
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1318
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1353
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1373
var result = provider.GetRequiredService<RootCommand>().
Parse
($"agent init --agents claude --scope {scope} --skills aspire");
1408
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1438
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1512
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1544
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1575
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1588
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1631
var result = provider.GetRequiredService<RootCommand>().
Parse
(
Commands\AgentInitCommandTests.cs (49)
40
Assert.Empty(root.
Parse
(command).Errors);
44
Assert.Empty(root.
Parse
($"{command} --skills {skills}").Errors);
54
Assert.NotEmpty(root.
Parse
($"{command} {options}").Errors);
58
root.
Parse
($"{command} --skills ").GetCompletions().Select(item => item.Label).Order(StringComparer.Ordinal));
102
var result = provider.GetRequiredService<RootCommand>().
Parse
(
133
var result = provider.GetRequiredService<RootCommand>().
Parse
(
154
var result = provider.GetRequiredService<RootCommand>().
Parse
(
214
var result = provider.GetRequiredService<RootCommand>().
Parse
(
235
var result = root.
Parse
($"agent init --mcp{suffix}");
239
Assert.NotEmpty(root.
Parse
("agent init --mcp invalid").Errors);
240
Assert.NotEmpty(root.
Parse
($"new aspire-empty --mcp{suffix}").Errors);
241
Assert.NotEmpty(root.
Parse
($"init --mcp{suffix}").Errors);
300
var result = provider.GetRequiredService<RootCommand>().
Parse
(
356
var result = provider.GetRequiredService<RootCommand>().
Parse
(
385
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init --agents copilot --mcp=false");
425
var command = provider.GetRequiredService<RootCommand>().
Parse
(
444
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents none --skills all");
464
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skills none");
486
var result = command.
Parse
($"agent init --agents all --scope {scope}");
512
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents invalid --skills all");
529
var result = command.
Parse
("agent init --agents copilot");
620
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --skills none");
639
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all");
658
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --mcp");
675
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --mcp=false");
695
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents none --skills all");
736
Assert.Equal(CliExitCodes.Success, await command.
Parse
(
740
Assert.Equal(CliExitCodes.Success, await command.
Parse
(
759
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents copilot --scope global --skills aspire");
796
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents copilot --scope global --skills aspire");
832
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents copilot --scope global --skills aspire");
871
var result = provider.GetRequiredService<RootCommand>().
Parse
(
923
var result = provider.GetRequiredService<RootCommand>().
Parse
(
953
var result = provider.GetRequiredService<RootCommand>().
Parse
(
984
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1012
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1043
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1059
var repeated = provider.GetRequiredService<RootCommand>().
Parse
(
1089
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1151
var result = provider.GetRequiredService<RootCommand>().
Parse
($"agent init --agents {agents} --scope project --skills {skills} --mcp=false --remove-skill-copies");
1203
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1235
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1290
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1309
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1341
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1378
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1416
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1474
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1504
var result = provider.GetRequiredService<RootCommand>().
Parse
(
Commands\AgentMcpCommandTests.cs (8)
95
var parseResult = rootCommand.
Parse
(commandLine);
1596
var parseResult = rootCommand.
Parse
("agent mcp --dashboard-url not-a-url");
1616
var parseResult = rootCommand.
Parse
(
1673
var parseResult = rootCommand.
Parse
(commandLine);
1707
var parseResult = rootCommand.
Parse
($"agent mcp --apphost \"{appHostProjectFile.FullName}\"");
1740
var parseResult = rootCommand.
Parse
($"agent mcp --apphost \"{appHostDirectory.FullName}\"");
1768
var parseResult = rootCommand.
Parse
($"agent mcp --apphost \"{missingPath}\"");
1803
var parseResult = rootCommand.
Parse
($"agent mcp --apphost \"{appHostDirectory.FullName}\"");
Commands\AgentTelemetryCommandTests.cs (7)
168
var result = command.
Parse
("agent telemetry --event-type skill_invocation --client-name copilot-cli --session-id 11111111-1111-1111-1111-111111111111 --skill-name aspire --timestamp 2026-01-01T00:00:00Z");
200
var result = command.
Parse
("agent telemetry --event-type tool_invocation --tool-name aspire-list_resources");
231
var result = command.
Parse
($"agent telemetry --event-type reference_file_read --file-reference {longValue}");
289
var result = command.
Parse
("agent telemetry --event-type not_a_real_event --skill-name aspire");
336
var result = command.
Parse
("agent telemetry --event-type skill_invocation --some-future-flag value");
351
var result = command.
Parse
("agent telemetry");
383
var result = command.
Parse
("agent telemetry --event-type reference_file_read --file-reference aspire/references/deploy.md");
Commands\ApiCommandTests.cs (5)
24
var result = command.
Parse
("docs api");
41
var result = command.
Parse
("docs api list csharp");
58
var result = command.
Parse
("docs api search emulator --language typescript --format json");
75
var result = command.
Parse
("docs api get csharp/aspire.test.package/testtype");
92
var result = command.
Parse
("docs api get missing/id");
Commands\BaseCommandTests.cs (26)
46
var result = command.
Parse
(args);
72
var result = command.
Parse
("integration list --format json");
93
var result = command.
Parse
("stop");
119
var result = command.
Parse
("stop");
143
var result = command.
Parse
("stop");
164
var result = command.
Parse
("test");
221
var result = command.
Parse
(args);
247
var result = command.
Parse
("run");
284
var result = command.
Parse
("run");
336
var result = provider.GetRequiredService<RootCommand>().
Parse
("ps");
369
var result = provider.GetRequiredService<RootCommand>().
Parse
("ps");
399
var result = command.
Parse
("add SomePackage");
434
var result = command.
Parse
("run");
492
var result = command.
Parse
(commandArgs);
542
var result = command.
Parse
("ps");
571
var result = command.
Parse
("ps");
624
var result = command.
Parse
("run");
663
var result = command.
Parse
("run");
699
var result = command.
Parse
(args);
727
var result = command.
Parse
("run --apphost somepath");
755
var result = command.
Parse
($"run {optionName}={value}");
801
var result = command.
Parse
("run --custom-arg value");
827
var result = command.
Parse
("run -- --AppHost somepath");
848
var result = command.
Parse
("run --AppHost foo -- --AppHost bar");
867
var result = command.
Parse
("add --AppHost somepath");
888
var result = command.
Parse
("resource myresource mycommand --AppHost primary");
Commands\CacheCommandTests.cs (7)
22
var result = command.
Parse
("cache");
37
var result = command.
Parse
("cache --help");
58
var result = command.
Parse
("cache clear");
79
var result = command.
Parse
("cache clear");
109
var result = command.
Parse
("cache clear");
136
var result = command.
Parse
("cache clear");
156
var result = command.
Parse
("cache clear");
Commands\CertificatesCommandTests.cs (4)
27
var result = command.
Parse
("certs --help");
42
var result = command.
Parse
("certs clean --help");
57
var result = command.
Parse
("certs trust --help");
111
var result = command.
Parse
("certs trust --non-interactive");
Commands\ConfigCommandTests.cs (56)
107
var result = command.
Parse
("config");
121
var result = command.
Parse
("config");
135
var result = command.
Parse
("config set foo bar");
160
var exitCode = await command.
Parse
($"config set {key} true --global").InvokeAsync().DefaultTimeout();
174
var setLlmsResult = command.
Parse
("config set docs.llmsTxtUrl http://localhost:4321/llms-small.txt");
178
var setSitemapResult = command.
Parse
("config set docs.api.sitemapUrl http://localhost:4321/sitemap-0.xml");
210
var result = command.
Parse
("config set certificates.nssDbPaths firefox=/profiles/firefox --global");
253
var result = command.
Parse
($"config set {AspireConfigContainerTunnel.BaseImageConfigKey} {image}");
289
var result = command.
Parse
("config set foo.bar baz");
314
var result = command.
Parse
("config set foo.bar.baz hello");
344
var result1 = command.
Parse
("config set foo primitive");
349
var result2 = command.
Parse
("config set foo.bar nested");
374
var setResult = command1.
Parse
("config set testkey testvalue");
385
var getResult = command2.
Parse
("config get testkey");
400
var setResult = command1.
Parse
("config set level1.level2.level3 nestedvalue");
410
var getResult = command2.
Parse
("config get level1.level2.level3");
423
var result = command.
Parse
("config get nonexistent.key");
439
Assert.Equal(CliExitCodes.Success, await command.
Parse
("config set plugins[0] deployment").InvokeAsync().DefaultTimeout());
446
Assert.Equal(CliExitCodes.Success, await readerCommand.
Parse
("config get plugins[0]").InvokeAsync().DefaultTimeout());
448
Assert.Equal(CliExitCodes.Success, await readerCommand.
Parse
("config delete plugins[0]").InvokeAsync().DefaultTimeout());
481
Assert.Equal(CliExitCodes.InvalidCommand, await command.
Parse
(commandLine).InvokeAsync().DefaultTimeout());
498
var setResult = command.
Parse
("config set deletekey deletevalue");
503
var deleteResult = command.
Parse
("config delete deletekey");
508
var getResult = command.
Parse
("config get deletekey");
523
var setResult = command.
Parse
("config set deep.nested.value test");
528
var deleteResult = command.
Parse
("config delete deep.nested.value");
552
var setResult1 = command.
Parse
("config set flatkey flatvalue");
556
var setResult2 = command.
Parse
("config set nested.key nestedvalue");
560
var setResult3 = command.
Parse
("config set deep.nested.key deepvalue");
565
var listResult = command.
Parse
("config list");
584
var setResult = command.
Parse
("config set testkey testvalue");
588
var listResult = command.
Parse
("config list");
610
var setResult = command.
Parse
("config set testkey testvalue");
614
var listResult = command.
Parse
("config list --all");
636
var listResult = command.
Parse
("config list");
658
var listResult = command.
Parse
("config list --all");
679
var setResult = command.
Parse
($"config set {KnownFeatures.FeaturePrefix}.testFeature true");
697
var setResult = command.
Parse
($"config set {KnownFeatures.FeaturePrefix}.testFeature false");
721
var setResult = command.
Parse
($"config set {KnownFeatures.FeaturePrefix}.testFeature invalid");
754
var setResult = command.
Parse
($"config set {KnownFeatures.FeaturePrefix}.{KnownFeatures.ShowDeprecatedPackages} true");
787
var result = command.
Parse
("config set features:polyglotSupportEnabled true");
820
var setResult = command.
Parse
($"config set {key} true");
844
.
Parse
($"config get {key}");
848
.
Parse
($"config delete features:{featureName}");
863
var result1 = command.
Parse
("config set features:polyglotSupportEnabled true");
868
var result2 = command.
Parse
("config set features.polyglotSupportEnabled false");
894
var result1 = command.
Parse
("config set features.polyglotSupportEnabled true");
899
var result2 = command.
Parse
("config set features:polyglotSupportEnabled false");
925
var setResult = command.
Parse
("config set features.polyglotSupportEnabled true");
930
var deleteResult = command.
Parse
("config delete features:polyglotSupportEnabled");
1018
var result = command.
Parse
($"config set {key} AppHost.csproj");
1048
var result = command.
Parse
($"config set {key} AppHost.csproj");
1080
var result = command.
Parse
($"config set {key} AppHost.csproj --global");
1105
var result = command.
Parse
($"config set -g overrideStagingFeed {stagingFeed}");
1145
var result = command.
Parse
("config set appHostPath AppHost.csproj");
1163
var result = command.
Parse
("config set appHost.language typescript/nodejs");
Commands\ConfigSourceCommandTests.cs (38)
48
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
(commandLine).InvokeAsync().DefaultTimeout();
74
.
Parse
($"{commandLine} --suppress-agent-init --non-interactive").InvokeAsync().DefaultTimeout();
173
await provider.GetRequiredService<RootCommand>().
Parse
(commandLine).InvokeAsync().DefaultTimeout();
267
await provider.GetRequiredService<RootCommand>().
Parse
(commandLine).InvokeAsync().DefaultTimeout();
321
await provider.GetRequiredService<RootCommand>().
Parse
("config list").InvokeAsync().DefaultTimeout();
364
var result = root.
Parse
($"agent init --agents {agent} --scope project --skills aspire --non-interactive");
429
var result = provider.GetRequiredService<RootCommand>().
Parse
(
442
var agentResult = agentProvider.GetRequiredService<RootCommand>().
Parse
(
482
.
Parse
("update --config-source --yes --non-interactive").InvokeAsync().DefaultTimeout();
526
var result = command.
Parse
("update --config-source --yes --non-interactive");
562
var result = provider.GetRequiredService<RootCommand>().
Parse
("update --config-source --yes --non-interactive");
626
var result = provider.GetRequiredService<RootCommand>().
Parse
("config get skillSources.team.repository");
643
var refresh = provider.GetRequiredService<RootCommand>().
Parse
("update --config-source --yes --non-interactive");
657
var result = provider.GetRequiredService<RootCommand>().
Parse
("update --config-source --non-interactive");
674
var result = provider.GetRequiredService<RootCommand>().
Parse
($"update --config-source {option}");
714
var result = provider.GetRequiredService<RootCommand>().
Parse
($"update --config-source{argument} --yes --non-interactive");
758
var result = provider.GetRequiredService<RootCommand>().
Parse
(
786
var result = command.
Parse
($"update --config-source --apphost \"{Path.Combine(project.FullName, "apphost.cs")}\" --yes --non-interactive");
810
var result = provider.GetRequiredService<RootCommand>().
Parse
("update --config-source --yes --non-interactive");
847
var result = provider.GetRequiredService<RootCommand>().
Parse
(
923
var result = provider.GetRequiredService<RootCommand>().
Parse
($"update --apphost \"{projectFile.FullName}\" --yes{consent}");
989
var result = provider.GetRequiredService<RootCommand>().
Parse
($"update --apphost \"{projectFile.FullName}\" --yes{consent}");
1021
var result = provider.GetRequiredService<RootCommand>().
Parse
("update --yes --non-interactive");
1066
var result = provider.GetRequiredService<RootCommand>().
Parse
("update --config-source --yes --non-interactive");
1195
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1228
var result = provider.GetRequiredService<RootCommand>().
Parse
($"{commandLine} --apphost \"{missingProject}\"");
1247
var result = provider.GetRequiredService<RootCommand>().
Parse
(commandLine);
1266
var result = provider.GetRequiredService<RootCommand>().
Parse
(commandLine);
1294
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1317
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1335
Assert.Equal(CliExitCodes.Success, await original.GetRequiredService<RootCommand>().
Parse
(command).InvokeAsync().DefaultTimeout());
1346
Assert.Equal(CliExitCodes.Success, await provider.GetRequiredService<RootCommand>().
Parse
(
1454
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
(command).InvokeAsync().DefaultTimeout();
1494
var refresh = refreshProvider.GetRequiredService<RootCommand>().
Parse
(
1523
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1576
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1622
.
Parse
("new aspire-empty --language csharp --use-config-source true --non-interactive")
1657
.
Parse
("update --config-source --yes --non-interactive").InvokeAsync().DefaultTimeout();
Commands\DashboardRunCommandTests.cs (18)
39
var result = command.
Parse
("dashboard run");
56
var result = command.
Parse
("dashboard run --help");
79
var result = command.
Parse
($"dashboard run {args}");
92
var result = command.
Parse
("dashboard run --ASPNETCORE_URLS=http://localhost:9999");
144
var result = command.
Parse
("dashboard run");
164
var result = command.
Parse
("dashboard run");
203
var result = command.
Parse
("dashboard run");
222
var result = command.
Parse
("dashboard run");
255
var result = command.
Parse
("dashboard run");
279
var result = command.
Parse
("dashboard run");
311
var result = command.
Parse
($"dashboard run {cliArgs}");
331
var result = command.
Parse
("dashboard run");
355
var result = command.
Parse
("dashboard run");
376
var result = command.
Parse
("dashboard run --CUSTOM_SETTING=myvalue");
401
var result = command.
Parse
("dashboard run --frontend-url http://localhost:5000 --otlp-grpc-url http://localhost:9317 --otlp-http-url http://localhost:9318 --allow-anonymous --application-name TestApp --persistence Run --config-file-path /my/config.json");
429
var result = command.
Parse
("dashboard run");
460
var result = command.
Parse
("dashboard run");
517
var result = command.
Parse
("dashboard run");
Commands\DeployCommandTests.cs (12)
30
var result = command.
Parse
("deploy --help");
60
var result = command.
Parse
("deploy");
126
var result = command.
Parse
(invocation);
178
var result = command.
Parse
("deploy --apphost invalid.csproj");
212
var result = command.
Parse
("deploy --apphost valid.csproj");
246
var result = command.
Parse
("deploy --apphost valid.csproj");
314
var result = command.
Parse
("deploy");
386
var result = command.
Parse
("deploy");
444
var result = command.
Parse
($"deploy --apphost \"{appHostFile.FullName}\" --environment \"{environment}\"");
492
var result = command.
Parse
($"deploy --apphost \"{appHostFile.FullName}\" --environment Production");
563
var result = command.
Parse
($"deploy --output-path {testOutputPath}");
623
var result = command.
Parse
("deploy");
Commands\DescribeCommandTests.cs (43)
64
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
(commandLine).InvokeAsync().DefaultTimeout();
86
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
(commandLine).InvokeAsync().DefaultTimeout();
110
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
("describe --follow").InvokeAsync().DefaultTimeout();
129
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
("describe").InvokeAsync().DefaultTimeout();
161
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
("describe").InvokeAsync().DefaultTimeout();
175
var result = command.
Parse
("describe --help");
189
var result = command.
Parse
("describe");
208
var result = command.
Parse
(commandLine);
226
var result = command.
Parse
($"describe --format {format} --help");
244
var result = command.
Parse
($"describe --format {format} --help");
259
var result = command.
Parse
("describe --format invalid");
274
var result = command.
Parse
("describe --follow --help");
289
var result = command.
Parse
("describe --watch --help");
304
var result = command.
Parse
("resources --help");
319
var result = command.
Parse
("describe --follow --format json --help");
334
var result = command.
Parse
("describe myresource --help");
349
var result = command.
Parse
("describe myresource --follow --format json --help");
550
var result = command.
Parse
("describe --follow --format json");
633
var result = command.
Parse
("describe --follow --format json");
672
var result = command.
Parse
("describe --follow --format json");
710
var result = command.
Parse
("describe --follow --format json");
758
var result = command.
Parse
("describe --follow --format json --include-disabled-commands");
803
var result = command.
Parse
("describe --follow --format json");
851
var result = command.
Parse
("describe --follow");
884
var result = command.
Parse
("describe --follow --format json");
914
var result = command.
Parse
("describe --follow --format json");
938
var result = command.
Parse
("describe --follow --format json");
965
var result = command.
Parse
("describe --format json");
1004
var result = command.
Parse
("describe --format json");
1035
var result = command.
Parse
("describe --follow --format json");
1065
var result = command.
Parse
("describe --format json");
1091
var result = command.
Parse
("describe --format json --include-hidden");
1118
var result = command.
Parse
("describe aspire-dashboard --format json");
1143
var result = command.
Parse
("describe --follow --format json");
1171
var result = command.
Parse
("describe --follow --format json --include-hidden");
1217
var result = provider.GetRequiredService<RootCommand>().
Parse
(args);
1239
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
("resources --format mermaid").InvokeAsync().DefaultTimeout();
1262
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
($"resources {resource} --format mermaid").InvokeAsync().DefaultTimeout();
1280
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
($"resources {resource} --format mermaid").InvokeAsync().DefaultTimeout();
1294
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
("resources --format mermaid --follow").InvokeAsync().DefaultTimeout();
1311
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
("resources missing --format mermaid").InvokeAsync().DefaultTimeout();
1332
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
("resources --format mermaid").InvokeAsync().DefaultTimeout();
1376
var result = command.
Parse
("describe");
Commands\DestroyCommandTests.cs (9)
28
var result = command.
Parse
("destroy --help");
65
var result = command.
Parse
(commandLine);
84
var result = command.
Parse
(commandLine);
116
var result = command.
Parse
("destroy --apphost invalid.csproj");
175
var result = command.
Parse
("destroy");
211
var result = command.
Parse
(commandLine);
274
var result = command.
Parse
(commandLine);
332
var result = command.
Parse
($"destroy --output-path {testOutputPath}");
385
var result = command.
Parse
("destroy --yes");
Commands\DoCommandTests.cs (23)
29
var result = command.
Parse
("do --help");
56
var result = command.
Parse
("do");
114
var result = command.
Parse
("do my-custom-step");
167
var result = command.
Parse
("do deploy");
220
var result = command.
Parse
("do publish");
278
var result = command.
Parse
("do my-step --output-path test-output");
310
var result = command.
Parse
("do my-step --apphost invalid.csproj");
399
var result = command.
Parse
(commandLine);
461
var exitCode = await command.
Parse
("do --list-steps --format json").InvokeAsync().DefaultTimeout();
507
var exitCode = await command.
Parse
("do --list-steps --format json").InvokeAsync().DefaultTimeout();
563
var result = command.
Parse
("do deploy --list-steps");
617
var result = command.
Parse
("do deploy --list-steps");
646
var exitCode = await command.
Parse
("do --list-steps --format json").InvokeAsync().DefaultTimeout();
675
var exitCode = await command.
Parse
("do --list-steps --format json").InvokeAsync().DefaultTimeout();
707
var exitCode = await command.
Parse
("do --list-steps --format json").InvokeAsync().DefaultTimeout();
737
var exitCode = await command.
Parse
("do --list-steps --format json").InvokeAsync().DefaultTimeout();
773
var exitCode = await command.
Parse
("do --list-steps --format json").InvokeAsync().DefaultTimeout();
829
var result = command.
Parse
("do deploy --list-steps");
844
var result = command.
Parse
("do --help");
882
var exitCode = await command.
Parse
("do deploy --format yaml").InvokeAsync().DefaultTimeout();
906
var exitCode = await command.
Parse
(commandLine).InvokeAsync().DefaultTimeout();
956
var result = command.
Parse
("do my-step --pipeline-log-level debug");
1011
var result = command.
Parse
("do my-step --log-level Warning");
Commands\DocsCommandTests.cs (10)
24
var result = command.
Parse
("docs");
42
var result = command.
Parse
("docs list");
59
var result = command.
Parse
("docs list --format json");
77
var result = command.
Parse
("docs search redis");
95
var result = command.
Parse
("docs search redis -n 3");
113
var result = command.
Parse
("docs search redis --format json");
130
var result = command.
Parse
("docs get redis-integration");
147
var result = command.
Parse
("docs get redis-integration --section \"Getting Started\"");
203
var result = command.
Parse
("docs get docs-smoke-test");
246
var result = command.
Parse
("docs get nonexistent-page");
Commands\DoctorCommandTests.cs (8)
30
var result = command.
Parse
("doctor --help");
106
var exitCode = await command.
Parse
("doctor").InvokeAsync().DefaultTimeout();
224
var result = command.
Parse
("doctor --format json");
805
var result = command.
Parse
("doctor --self");
870
var result = command.
Parse
("doctor");
924
var result = command.
Parse
("doctor");
1051
var result = command.
Parse
("doctor");
1099
var result = command.
Parse
(commandLine);
Commands\ExportCommandTests.cs (14)
61
var result = command.
Parse
($"export --output {outputPath}");
132
var result = command.
Parse
($"export --output {outputPath}");
165
var result = command.
Parse
($"export --apphost {appHostProjectPath} --output {outputPath}");
280
var result = command.
Parse
($"export --output {outputPath}");
342
var result = command.
Parse
($"export --output {outputPath}");
460
var result = command.
Parse
($"export redis --output {outputPath}");
518
var result = command.
Parse
($"export webfrontend --output {outputPath}");
578
var result = command.
Parse
($"export apiservice --output {outputPath}");
628
var result = command.
Parse
($"export --output {outputPath}");
670
var result = command.
Parse
($"export --include-hidden --output {outputPath}");
714
var result = command.
Parse
($"export aspire-dashboard --output {outputPath}");
750
var result = command.
Parse
($"export nonexistent --output {outputPath}");
789
var result = command.
Parse
($"export --dashboard-url http://localhost:18888 --api-key test-token --output {outputPath}");
836
var result = command.
Parse
($"export --output {outputPath}");
Commands\ExtensionInternalCommandTests.cs (8)
37
var result = command.
Parse
("extension --help");
51
var result = command.
Parse
("extension");
72
var result = command.
Parse
("extension get-apphosts");
120
var result = command.
Parse
("extension get-apphosts --nologo");
149
var result = command.
Parse
("extension get-apphosts");
188
var result = command.
Parse
("extension get-apphosts");
206
var result = command.
Parse
("extension get-apphosts");
220
var result = command.
Parse
("extension get-apphosts --help");
Commands\InitCommandTests.cs (58)
66
var exitCode = await command.
Parse
("init").InvokeAsync().DefaultTimeout();
154
var parseResult = initCommand.
Parse
("init");
182
var result = provider.GetRequiredService<RootCommand>().
Parse
(
233
var parseResult = initCommand.
Parse
($"init{additionalArgs}");
261
var parseResult = initCommand.
Parse
("init --file-based");
309
var parseResult = command.
Parse
("init --file-based --language csharp --non-interactive --suppress-agent-init");
334
var parseResult = command.
Parse
("init --help");
350
var parseResult = initCommand.
Parse
("init");
372
var parseResult = initCommand.
Parse
("init");
394
var parseResult = initCommand.
Parse
("init");
475
var parseResult = initCommand.
Parse
("init");
526
var parseResult = initCommand.
Parse
("init");
564
var parseResult = initCommand.
Parse
("init --source https://example.test/v3/index.json --version 13.0.0 --channel daily --suppress-agent-init");
622
var parseResult = command.
Parse
($"init --file-based{languageArgs}");
666
var parseResult = initCommand.
Parse
($"init{additionalArgs}");
700
var parseResult = initCommand.
Parse
("init --language go --suppress-agent-init");
740
var parseResult = initCommand.
Parse
("init --suppress-agent-init");
769
var parseResult = initCommand.
Parse
($"init --language typescript{additionalArgs}");
819
var parseResult = initCommand.
Parse
($"init --language typescript{additionalArgs}");
862
var exitCode = await command.
Parse
("init --language go --non-interactive --suppress-agent-init")
905
var parseResult = initCommand.
Parse
("init --language typescript");
938
var parseResult = initCommand.
Parse
("init --language typescript --skills aspire");
974
var parseResult = initCommand.
Parse
("init --language typescript --skills none");
1037
var result = provider.GetRequiredService<InitCommand>().
Parse
(
1058
var parseResult = command.
Parse
("init --non-interactive --skills none");
1080
var parseResult = command.
Parse
("init --non-interactive --agents none");
1102
var parseResult = command.
Parse
($"init --non-interactive --agents copilot --scope {scope} --skills aspire");
1138
var parseResult = command.
Parse
($"init --non-interactive --agents copilot --scope project --skills aspire{option}");
1160
var parseResult = initCommand.
Parse
("init");
1208
var parseResult = initCommand.
Parse
("init");
1232
var parseResult = initCommand.
Parse
("init");
1278
var parseResult = initCommand.
Parse
($"init{additionalArgs}");
1320
var parseResult = initCommand.
Parse
("init");
1408
var parseResult = initCommand.
Parse
("init");
1461
var parseResult = initCommand.
Parse
("init");
1516
var parseResult = initCommand.
Parse
("init");
1565
var parseResult = initCommand.
Parse
("init");
1601
var parseResult = initCommand.
Parse
("init");
1636
var parseResult = initCommand.
Parse
("init");
1672
var parseResult = initCommand.
Parse
("init");
1714
var parseResult = initCommand.
Parse
("init");
1745
var parseResult = initCommand.
Parse
("init");
1789
var parseResult = initCommand.
Parse
("init");
1841
var parseResult = initCommand.
Parse
("init");
1889
var parseResult = initCommand.
Parse
("init");
1943
var parseResult = initCommand.
Parse
("init");
1995
var parseResult = initCommand.
Parse
("init");
2066
var parseResult = initCommand.
Parse
("init");
2151
var parseResult = initCommand.
Parse
("init");
2219
var parseResult = initCommand.
Parse
("init");
2269
var parseResult = initCommand.
Parse
("init");
2315
var parseResult = initCommand.
Parse
("init");
2352
var parseResult = initCommand.
Parse
("init");
2401
var parseResult = initCommand.
Parse
("init");
2463
var parseResult = initCommand.
Parse
("init");
2514
var parseResult = initCommand.
Parse
("init");
2576
var parseResult = initCommand.
Parse
("init");
2623
var parseResult = initCommand.
Parse
("init");
Commands\LogsCommandTests.cs (39)
27
var result = command.
Parse
("logs --help");
129
var result = command.
Parse
($"logs --tail {tailValue}");
150
var result = command.
Parse
($"logs --tail {tailValue} --help");
167
var result = command.
Parse
("logs myresource");
187
var result = command.
Parse
($"logs --format {format} --help");
205
var result = command.
Parse
($"logs --format {format} --help");
220
var result = command.
Parse
("logs --format invalid");
236
var result = command.
Parse
("logs --follow --tail 50 --help");
251
var result = command.
Parse
("logs myresource --follow --tail 100 --format json --help");
267
var result = command.
Parse
("logs -f -n 10 --help");
381
var result = command.
Parse
("logs --format json");
411
var result = command.
Parse
("logs");
438
var result = command.
Parse
($"logs {resourceName} --format json");
460
var result = command.
Parse
("logs --format json --timestamps");
498
var result = command.
Parse
("logs --format json");
537
var result = command.
Parse
("logs --timestamps");
559
var result = command.
Parse
("logs");
595
var result = command.
Parse
("logs");
627
var result = command.
Parse
("logs --format json");
649
var result = command.
Parse
("logs --format json");
674
var result = command.
Parse
("logs --format json --include-hidden");
699
var result = command.
Parse
("logs aspire-dashboard --format json");
784
var result = command.
Parse
("logs --format json");
893
var result = command.
Parse
("logs --follow");
915
var result = command.
Parse
("logs --follow --format json");
938
var result = command.
Parse
("logs --follow --format json");
960
var result = command.
Parse
("logs --follow --format json");
1050
var result = command.
Parse
("logs redis --search timeout --format json");
1081
var result = command.
Parse
("logs redis --search Ready --format json");
1110
var result = command.
Parse
("logs redis --search nonexistent --format json");
1141
var result = command.
Parse
("logs redis --search \"Connection timeout\" --format json");
1173
var result = command.
Parse
("logs redis --search level:error --format json");
1208
var result = command.
Parse
("logs redis --search Ready --tail 2 --format json");
1256
var result = command.
Parse
("logs redis --search Ready --tail 2 --format json");
1292
var result = command.
Parse
("logs redis --search timeout --tail 1 --format json");
1337
var result = command.
Parse
("logs --search timeout --tail 1 --format json");
1386
var result = command.
Parse
("logs --follow --search timeout");
1415
var result = command.
Parse
("logs redis --follow --tail 10 --search timeout");
1460
var result = command.
Parse
("logs redis --follow --tail 10 --search timeout");
Commands\LsCommandTests.cs (22)
33
var result = command.
Parse
("ls --help");
48
var result = command.
Parse
("ls");
66
var result = command.
Parse
($"ls --format {format}");
81
var result = command.
Parse
("ls --format invalid");
112
var result = command.
Parse
("ls --format json");
152
var result = command.
Parse
("ls --format json");
193
var result = command.
Parse
("ls --format json");
234
var result = command.
Parse
("ls --format json");
266
var result = command.
Parse
("ls --format json");
307
var result = command.
Parse
("ls --format json --stream");
349
var result = command.
Parse
("ls --format json --stream");
394
var result = command.
Parse
("ls --format json --stream");
441
var result = command.
Parse
("ls --format json --stream");
485
var result = command.
Parse
("ls --format json --stream");
507
var result = command.
Parse
("ls --stream");
539
var result = command.
Parse
("ls");
578
var result = command.
Parse
("ls");
646
var result = command.
Parse
("ls");
689
var result = command.
Parse
("ls");
719
var result = command.
Parse
("ls");
748
var result = command.
Parse
("ls --all");
786
var result = command.
Parse
("ls --format json --all");
Commands\McpCommandTests.cs (7)
21
var result = command.
Parse
("mcp");
36
var result = command.
Parse
("mcp --help");
50
var result = command.
Parse
("mcp start --help");
108
var result = command.
Parse
("agent");
123
var result = command.
Parse
("agent --help");
137
var result = command.
Parse
("agent mcp --help");
151
var result = command.
Parse
("agent init --help");
Commands\NewCommandChannelResolutionTests.cs (2)
112
var parseResult = newCommand.
Parse
("new aspire-starter --name TestApp --output ./output --use-redis-cache --test-framework None");
606
var parseResult = newCommand.
Parse
($"new fake-template --name TestApp --output ./captured{channelArg}{versionArg}{sourceArg}");
Commands\NewCommandLocalTemplateTests.ConfiguredGitSourceObjects.cs (1)
112
.
Parse
("new --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
Commands\NewCommandLocalTemplateTests.ConfiguredGitSources.cs (10)
65
.
Parse
("new --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
117
.
Parse
("new --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
149
.
Parse
($"new --name Demo --output out{invocation} --suppress-agent-init").InvokeAsync().DefaultTimeout();
230
.
Parse
("new --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
274
var command = provider.GetRequiredService<RootCommand>().
Parse
("new --name Demo --output out --suppress-agent-init");
457
.
Parse
(commandLine).InvokeAsync(cancellationToken: cancellation.Token).DefaultTimeout();
488
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
534
.
Parse
("new --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
584
.
Parse
("new --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
638
var result = await provider.GetRequiredService<RootCommand>().
Parse
("new --name Demo --output out")
Commands\NewCommandLocalTemplateTests.ConfiguredSources.cs (10)
48
.
Parse
("new --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
371
.
Parse
("new --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
415
.
Parse
("new --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
442
.
Parse
("new --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
486
.
Parse
("new --name Demo --output out --suppress-agent-init").InvokeAsync(cancellationToken: cancellation.Token).DefaultTimeout();
506
Assert.Equal(CliExitCodes.Success, await command.
Parse
("new --help").InvokeAsync().DefaultTimeout());
543
var result = await provider.GetRequiredService<RootCommand>().
Parse
("new")
573
var result = await provider.GetRequiredService<RootCommand>().
Parse
("new").InvokeAsync().DefaultTimeout();
644
var result = await provider.GetRequiredService<RootCommand>().
Parse
("new --language unknown").InvokeAsync().DefaultTimeout();
674
var result = await provider.GetRequiredService<RootCommand>().
Parse
("new")
Commands\NewCommandLocalTemplateTests.cs (42)
54
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
115
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
160
var exitCode = await command.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
193
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
204
.
Parse
("new --template-path template --name Demo --output non-interactive-out --suppress-agent-init")
235
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
287
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
314
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
348
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
371
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
425
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
467
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
489
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
527
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
564
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
637
var exitCode = await command.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
669
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
737
var exitCode = await command.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
778
var exitCode = await command.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
814
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
861
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
947
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
1002
.
Parse
("new --template-repository https://example.test/templates.git --name Demo --output out --suppress-agent-init")
1040
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
1080
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
1119
var exitCode = await command.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
1148
var exitCode = await command.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
1179
var exitCode = await command.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
1195
var exitCode = await command.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
1227
var exitCode = await command.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
1246
var exitCode = await command.
Parse
($"new {options} --template-path template --suppress-agent-init").InvokeAsync().DefaultTimeout();
1263
var exitCode = await command.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
1291
var exitCode = await command.
Parse
("new --template-path templates --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
1315
var exitCode = await command.
Parse
("new --template-path missing --help").InvokeAsync().DefaultTimeout();
1505
.
Parse
("new --template-repository https://example.test/templates.git --template-path template --name Demo --output out --suppress-agent-init")
1580
.
Parse
("new --template-repository https://example.test/templates.git --template-path template --name Demo --output out --suppress-agent-init")
1664
var parseResult = command.
Parse
("new --template-repository=-repository --template-path template --name Demo --output out --suppress-agent-init");
1904
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
($"new {options} --suppress-agent-init").InvokeAsync().DefaultTimeout();
1925
.
Parse
($"new {options} --name Demo --output out --suppress-agent-init").InvokeAsync().DefaultTimeout();
1944
.
Parse
($"new {options} --template-repository https://example.test/templates.git --suppress-agent-init").InvokeAsync().DefaultTimeout();
1960
var result = provider.GetRequiredService<RootCommand>().
Parse
($"new aspire-starter {option} template-value");
1977
.
Parse
("new --template-repository https://example.test/templates.git --help").InvokeAsync().DefaultTimeout();
Commands\NewCommandLocalTemplateTests.HostConfiguration.cs (11)
72
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
111
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
168
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
201
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
234
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
256
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
284
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
327
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
371
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
424
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
490
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
Commands\NewCommandLocalTemplateTests.InitConfig.cs (6)
66
.
Parse
("new --name Demo --output out --suppress-agent-init")
89
var result = await provider.GetRequiredService<RootCommand>().
Parse
(commandLine).InvokeAsync().DefaultTimeout();
110
.
Parse
("template source list --format json --use-config-source true").InvokeAsync().DefaultTimeout();
213
.
Parse
("new --use-config-source --name Demo --output out --suppress-agent-init")
264
.
Parse
($"new {(consent is false ? "--use-config-source false " : "")}--name Demo --output out --suppress-agent-init")
292
.
Parse
("template source list --format json --use-config-source").InvokeAsync().DefaultTimeout();
Commands\NewCommandLocalTemplateTests.NuGetValues.cs (13)
56
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
132
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
160
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
194
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
228
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
255
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
284
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
329
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
372
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
404
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
431
var parseResult = provider.GetRequiredService<RootCommand>().
Parse
("new --template-path template");
461
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
508
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
Commands\NewCommandLocalTemplateTests.PromptDefaults.cs (6)
29
.
Parse
($"new --template-path template --name \"{name}\" --output out --suppress-agent-init")
62
.
Parse
("new --template-path template --name Demo.App --output out --suppress-agent-init")
88
.
Parse
("new --template-path template --output out --suppress-agent-init")
218
.
Parse
("new --template-path template --name Demo --output out --suppress-agent-init")
245
.
Parse
($"new --template-path template {options} --suppress-agent-init")
270
.
Parse
("new --template-path template --name Demo.App --output out --suppress-agent-init")
Commands\NewCommandLocalTemplateTests.SourceList.cs (15)
55
.
Parse
(json ? "template source list --format json" : "template source list").InvokeAsync().DefaultTimeout();
103
.
Parse
("template source list --format json").InvokeAsync().DefaultTimeout();
123
.
Parse
($"template source list{options}").InvokeAsync().DefaultTimeout();
145
.
Parse
("template source list --format json").InvokeAsync().DefaultTimeout();
163
.
Parse
("template source list --format json").InvokeAsync().DefaultTimeout();
177
var parseResult = provider.GetRequiredService<RootCommand>().
Parse
("template source list --format yaml");
245
.
Parse
($"template source list{options}").InvokeAsync().DefaultTimeout();
314
.
Parse
($"template source list --format json{(useSource is false ? " --use-config-source false" : "")}")
353
.
Parse
($"template source list{options}").InvokeAsync().DefaultTimeout();
420
.
Parse
($"template source list{options}").InvokeAsync().DefaultTimeout();
448
var omitted = root.
Parse
(command);
453
var explicitValue = root.
Parse
($"{command} --use-config-source {value.ToString().ToLowerInvariant()}");
457
var bareFlag = root.
Parse
($"{command} --use-config-source");
484
var parsed = root.
Parse
($"{command} {option} {followingOption} --non-interactive");
504
var parsed = root.
Parse
($"{command} --use-config-source {value} --non-interactive");
Commands\NewCommandLocalTemplateTests.SourceListGit.cs (4)
70
.
Parse
("template source list --format json --use-config-source").InvokeAsync().DefaultTimeout());
113
.
Parse
($"template source list{options}").InvokeAsync().DefaultTimeout();
218
.
Parse
("template source list --format json --use-config-source").InvokeAsync().DefaultTimeout());
264
.
Parse
($"new {(consent is null ? "" : $"--use-config-source {consent.Value.ToString().ToLowerInvariant()} ")}--name Demo --output out --suppress-agent-init")
Commands\NewCommandLocalTemplateTests.SourceManagement.cs (16)
128
.
Parse
($"template source add company --repository https://example.test/templates --non-interactive {yesOption}");
287
Assert.Equal(CliExitCodes.InvalidCommand, await root.
Parse
("template source add company --repository https://example.test/replacement --yes").InvokeAsync().DefaultTimeout());
289
Assert.Equal(CliExitCodes.ConfigNotFound, await root.
Parse
("template source remove missing").InvokeAsync().DefaultTimeout());
308
Assert.Equal(CliExitCodes.InvalidCommand, await root.
Parse
("template source add company --repository https://example.test/templates --yes").InvokeAsync().DefaultTimeout());
310
Assert.Equal(CliExitCodes.InvalidCommand, await root.
Parse
("template source remove company").InvokeAsync().DefaultTimeout());
349
Assert.Equal(CliExitCodes.InvalidCommand, await root.
Parse
("template source add COMPANY --repository https://example.test/duplicate --yes").InvokeAsync().DefaultTimeout());
351
Assert.Equal(CliExitCodes.Success, await root.
Parse
("config set templateSources.company.path templates/api --global").InvokeAsync().DefaultTimeout());
352
Assert.Equal(CliExitCodes.Success, await root.
Parse
("config set TEMPLATESOURCES.COMPANY.repository https://example.test/repo --global").InvokeAsync().DefaultTimeout());
353
Assert.Equal(CliExitCodes.Success, await root.
Parse
("config set templateSources.company.ref main --global").InvokeAsync().DefaultTimeout());
363
Assert.Equal(CliExitCodes.Success, await root.
Parse
("template source add other --repository https://example.test/other --yes").InvokeAsync().DefaultTimeout());
364
Assert.Equal(CliExitCodes.Success, await root.
Parse
("template source remove company").InvokeAsync().DefaultTimeout());
366
Assert.Equal(CliExitCodes.Success, await root.
Parse
("template source remove OTHER").InvokeAsync().DefaultTimeout());
400
.
Parse
("config set templateSources.company.path templates/api --global").InvokeAsync().DefaultTimeout();
444
.
Parse
("config set templateSources.company.path ../escape --global").InvokeAsync().DefaultTimeout();
467
var result = await provider.GetRequiredService<RootCommand>().
Parse
(command).InvokeAsync().DefaultTimeout();
492
Assert.Equal(CliExitCodes.Success, await root.
Parse
("template source remove broken").InvokeAsync().DefaultTimeout());
Commands\NewCommandTemplateConfigPersistenceTests.cs (2)
323
var parseResult = newCommand.
Parse
(string.Join(" ", commandArguments));
477
var parseResult = newCommand.
Parse
(
Commands\NewCommandTests.cs (81)
41
var result = command.
Parse
("new --help");
65
var result = command.
Parse
(
146
var configResult = configCommand.
Parse
($"config set -g overrideStagingFeed {stagingFeed}");
175
var result = command.
Parse
($"new {KnownTemplateId.CSharpEmptyAppHost} --language csharp --name TemplateOut --output ./TemplateOut --localhost-tld false");
203
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
227
var result = command.
Parse
($"new aspire-starter --use-redis-cache --test-framework {testFramework}");
283
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
316
var result = command.
Parse
("new aspire-starter --name MyApp --output ./output --use-redis-cache --test-framework None");
348
var result = command.
Parse
("new aspire-starter --output notsrc --use-redis-cache --test-framework None");
426
var result = command.
Parse
("new aspire-starter --channel stable --use-redis-cache --test-framework None");
503
var result = command.
Parse
("new aspire-starter --channel stable --use-redis-cache --test-framework None");
580
var result = command.
Parse
("new aspire-starter --channel pr-12345 --name TestApp --output ./output --use-redis-cache --test-framework None");
619
var result = command.
Parse
("new aspire-starter --name MyApp --output ./output --use-redis-cache --test-framework None");
651
var result = command.
Parse
("new aspire-starter --name MyApp --output ./output --use-redis-cache --test-framework None --version 9.2.0");
687
var result = command.
Parse
("new");
728
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
825
var result = command.
Parse
("new aspire-starter --name TestApp --output ./output");
888
var result = command.
Parse
($"new aspire-starter --use-redis-cache --test-framework None");
947
var result = command.
Parse
("new --name TestApp --output ./output");
1004
var result = command.
Parse
("new --name TestApp --output ./output");
1069
var result = command.
Parse
("new --name TestApp --output ./output");
1104
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output");
1165
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output");
1228
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output");
1256
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init");
1326
var result = command.
Parse
($"new aspire-empty --name TestApp --output ./output --language csharp --localhost-tld false --suppress-agent-init --channel staging --source {sourceOverride}");
1371
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --language csharp --localhost-tld false --suppress-agent-init --channel staging --source relative-feed");
1424
var result = command.
Parse
($"new aspire-empty --name TestApp --output ./output --language {language} --localhost-tld false --suppress-agent-init --source \"{sourceOverride}\"");
1450
var result = command.
Parse
($"new aspire-empty --name TestApp --output ./output --language csharp --localhost-tld false --suppress-agent-init --source \"{sourceOverride}\"");
1485
var result = command.
Parse
($"new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init --source {sourceOverride}");
1519
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init --source nuget.org");
1553
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init");
1592
var result = command.
Parse
("new aspire-java-empty --name TestApp --output ./output --localhost-tld false");
1628
var result = command.
Parse
("new aspire-py-empty --name TestApp --output ./output --localhost-tld false");
1656
var result = command.
Parse
("new aspire-go-empty --name TestApp --output ./output --localhost-tld false");
1673
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --localhost-tld false");
1702
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --localhost-tld false --suppress-agent-init");
1740
var result = command.
Parse
($"new aspire-empty --name TestApp --output ./output --version {version} --localhost-tld false --suppress-agent-init");
1774
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --localhost-tld false --suppress-agent-init");
1808
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --localhost-tld --suppress-agent-init");
1882
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output");
1923
var result = command.
Parse
("new aspire-ts-empty --name TestApp --output ./output --localhost-tld false");
1971
var result = command.
Parse
("new aspire-ts-empty --name TestApp --output ./output --channel stable --localhost-tld false");
2012
var result = command.
Parse
("new aspire-ts-empty --name TestApp --localhost-tld false");
2090
var result = command.
Parse
("new aspire-ts-empty --name TestApp --output ./output");
2169
var result = command.
Parse
("new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false");
2234
var result = command.
Parse
("new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false");
2293
var result = command.
Parse
($"new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false --source \"{sourceOverride}\"");
2349
var result = command.
Parse
($"new aspire-starter --name TestApp --output ./output --source {sourceOverride} --use-redis-cache --test-framework None");
2405
var result = command.
Parse
($"new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false --source {sourceOverride}");
2433
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output");
2458
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --agents none");
2483
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --agents copilot --skills aspire");
2519
var result = command.
Parse
($"new aspire-empty --name TestApp --output ./output --agents copilot --scope global --skills aspire{option}");
2561
var result = command.
Parse
("new");
2609
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
2653
var result = command.
Parse
($"new aspire-starter --name MyProject --output {Path.Combine(workspace.WorkspaceRoot.FullName, "my-project")} --use-redis-cache --test-framework None");
2697
var result = command.
Parse
($"new aspire-starter --name MyProject --output {outputDir} --use-redis-cache --test-framework None --suppress-agent-init");
2744
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
2783
var result = command.
Parse
("new aspire-ts-empty --name TestApp --output ./output");
2838
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None --suppress-agent-init");
2897
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None --suppress-agent-init");
2954
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
3016
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None --suppress-agent-init");
3078
var result = command.
Parse
($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false --suppress-agent-init");
3141
var result = command.
Parse
($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false --suppress-agent-init");
3219
var result = command.
Parse
(
3294
var result = command.
Parse
($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false --suppress-agent-init");
3363
var result = command.
Parse
($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false --suppress-agent-init");
3417
var result = command.
Parse
($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false --suppress-agent-init");
3455
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --localhost-tld false");
3485
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --suppress-agent-init");
3512
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --suppress-agent-init=false");
3541
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output");
3568
var result = provider.GetRequiredService<NewCommand>().
Parse
(
3604
var result = command.
Parse
($"new aspire-starter --name TestApp --output {existingDir.FullName} --use-redis-cache --test-framework None");
3626
var result = command.
Parse
($"new aspire-starter --name TestApp --output {emptyDir.FullName} --use-redis-cache --test-framework None");
3661
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
3686
var result = command.
Parse
($"new aspire-starter --name TestApp --output {invalidPath} --use-redis-cache --test-framework None");
3732
var result = command.
Parse
("new aspire-starter --name TestApp --output . --use-redis-cache --test-framework None");
3791
var result = command.
Parse
("new aspire-starter");
Commands\OptionWithLegacyTests.cs (2)
19
var result = command.
Parse
("test --new-name primary-value --old-name legacy-value");
34
var result = command.
Parse
("test --old-name legacy-value");
Commands\PsCommandTests.cs (22)
42
var result = command.
Parse
("ps --help");
57
var result = command.
Parse
("ps");
76
var result = command.
Parse
($"ps --format {format}");
94
var result = command.
Parse
($"ps --format {format}");
109
var result = command.
Parse
("ps --format invalid");
161
var result = command.
Parse
($"ps --format json {outputOption}");
213
var result = command.
Parse
("ps --format json");
251
var result = command.
Parse
("ps --format json");
297
var result = command.
Parse
("ps --format json");
339
var result = command.
Parse
("ps --format json");
385
var result = command.
Parse
("ps");
418
var result = command.
Parse
("ps");
459
var result = command.
Parse
("ps");
482
var result = command.
Parse
("ps --format json");
518
var result = command.
Parse
("ps --format json");
558
var result = command.
Parse
("ps --format json --follow");
601
var exitCode = await command.
Parse
("ps --format json --follow")
644
var result = command.
Parse
("ps --follow");
692
var result = command.
Parse
("ps --format json --follow");
736
var result = command.
Parse
("ps --format json");
783
var result = command.
Parse
("ps --format json");
822
var result = command.
Parse
("ps --format json");
Commands\PublishCommandPromptingIntegrationTests.cs (20)
47
var result = command.
Parse
("publish");
93
var result = command.
Parse
("publish");
145
var result = command.
Parse
("publish");
192
var result = command.
Parse
("publish");
238
var result = command.
Parse
("publish");
287
var result = command.
Parse
("publish");
322
var result = command.
Parse
("publish");
370
var result = command.
Parse
("publish");
449
var result = command.
Parse
("publish");
517
var result = command.
Parse
("publish");
569
var result = command.
Parse
("publish");
624
var result = command.
Parse
("publish");
695
var result = command.
Parse
("publish --debug");
739
var result = command.
Parse
("publish");
782
var result = command.
Parse
("publish");
831
var result = command.
Parse
("publish");
877
var result = command.
Parse
("publish");
917
var result = command.
Parse
("publish");
963
var result = command.
Parse
("publish");
997
var result = command.
Parse
("publish");
Commands\PublishCommandTests.cs (6)
24
var result = command.
Parse
("publish --help");
52
var result = command.
Parse
("publish --apphost invalid.csproj");
83
var result = command.
Parse
("publish --apphost valid.csproj");
114
var result = command.
Parse
("publish --apphost valid.csproj");
157
var result = command.
Parse
("publish --apphost valid.csproj");
226
var result = command.
Parse
("publish");
Commands\ResourceCommandHelpParserTests.cs (4)
18
command.
Parse
("resource web wait-for-browser --help"),
35
command.
Parse
("resource web wait-for-browser --apphost ./AppHost/AppHost.csproj --help"),
53
command.
Parse
("resource web wait-for-browser --project ./AppHost/AppHost.csproj --help"),
79
command.
Parse
(commandLine),
Commands\ResourceCommandTests.cs (73)
30
var result = command.
Parse
("resource --help");
62
var result = command.
Parse
("resource web --non-interactive --help");
93
var result = command.
Parse
("resource web --help");
118
var result = command.
Parse
("resource web --help");
141
var result = command.
Parse
("resource web --help");
182
var result = command.
Parse
($"""resource web --apphost "{appHostDirectory.FullName}" --help""");
229
var result = command.
Parse
($"""resource web --apphost "{appHostProjectFile.FullName}" --help""");
272
var result = command.
Parse
($"""resource web --apphost "{symlinkedAppHostPath}" --help""");
301
var result = command.
Parse
("resource hidden-worker --include-hidden --help");
317
var result = command.
Parse
("resource");
336
var result = command.
Parse
($"""resource {arguments}""");
353
var result = command.
Parse
("resource myresource");
373
var result = command.
Parse
($"""resource myresource {arguments}""");
390
var result = command.
Parse
("resource myresource my-command --help");
404
var result = command.
Parse
("resource myresource my-command --apphost /path/to/project.csproj --help");
426
var result = command.
Parse
($"resource myresource {commandName} --help");
458
var result = command.
Parse
($"resource myresource {commandName}");
497
var result = command.
Parse
("resource myresource my-command");
522
var result = command.
Parse
("resource myresource start --apphost /path/to/project.csproj --help");
545
var result = command.
Parse
("resource myresource Start");
582
var result = command.
Parse
("""resource web-browser-automation fill-browser "#name" Aspire""");
609
var result = command.
Parse
("""resource web-browser-automation click-browser""");
646
var result = command.
Parse
("""resource web-browser-automation wait-for-browser "--text=Submitted Aspire!" --timeoutMilliseconds=500""");
684
var result = command.
Parse
("resource mydb configure -- --AppHost primary");
719
var result = command.
Parse
("resource greeting parameter-set --value \"Hello world\"");
779
var result = command.
Parse
("""resource web-browser-automation navigate-browser "https://example.com/?q=aspire" """);
806
var result = command.
Parse
("""resource web-browser-automation click-browser "#submit" extra""");
833
var result = command.
Parse
("""resource web-browser-automation click-browser --selector "#submit" --count 2""");
860
var result = command.
Parse
("""resource web-browser-automation configure --verbose""");
880
var result = command.
Parse
("""resource web-browser-automation configure -- --selector "#submit" """);
916
var result = command.
Parse
("""resource web-browser-automation wait-for-browser --timeout-milliseconds 500""");
944
var result = command.
Parse
("""resource web-browser-automation Configure --message hello""");
980
var result = command.
Parse
("""resource web-browser-automation configure --timeout-milliseconds=500 --proxy""");
1011
var result = command.
Parse
($"""resource web-browser-automation configure {arguments}""");
1046
var result = command.
Parse
("""resource web-browser-automation configure --flavor chocolate""");
1082
var result = command.
Parse
("""resource web-browser-automation configure --flavor strawberry""");
1112
var result = command.
Parse
("""resource web-browser-automation configure --unknown value""");
1138
var result = command.
Parse
("""resource web-browser-automation configure --mm ss""");
1165
var result = command.
Parse
("""resource web-browser-automation configure --proxy maybe""");
1194
var result = command.
Parse
("""resource web-browser-automation configure --save-to-user-secrets true""");
1234
var result = command.
Parse
("""resource web-browser-automation configure --timeout-seconds 0""");
1269
var result = command.
Parse
("resource myresource my-command");
1302
var result = command.
Parse
("""resource web configure""");
1338
var result = command.
Parse
("""resource web-browser-automation configure --flavor strawberry""");
1368
var result = command.
Parse
("""resource web-browser-automation configure""");
1401
var result = command.
Parse
($"""resource web-browser-automation configure {arguments}""");
1430
var result = command.
Parse
("""resource web-browser-automation configure --timeoutMilliseconds 1 --timeout-milliseconds 2""");
1459
var result = command.
Parse
("""resource web-browser-automation configure --message first --message second""");
1489
var result = command.
Parse
("""resource web-browser-automation wait-for-browser --timeout-milliseconds 500""");
1521
var result = command.
Parse
("""resource web-browser-automation wait-for-browser""");
1559
var result = command.
Parse
("""resource web-browser-automation wait-for-browser --timeout-milliseconds not-a-number""");
1595
var result = command.
Parse
("""resource web-browser-automation fill-browser --selector "#name" Aspire""");
1630
var result = command.
Parse
("""resource web-browser-automation configure -- --log-level Debug""");
1659
var result = command.
Parse
("""resource web-browser-automation configure -- --message "from delimiter" --timeout-milliseconds 10""");
1688
var result = command.
Parse
("resource hidden-worker configure --include-hidden -- --message \"from hidden resource\"");
1717
var result = command.
Parse
("""resource web-browser-automation configure --log-level Debug""");
1752
var result = command.
Parse
("""resource web-browser-automation configure --no-proxy localhost""");
1796
var result = command.
Parse
("""resource web-browser-automation configure --load-arguments -- --browser Chrome""");
1840
var result = command.
Parse
("""resource web-browser-automation configure --load-arguments -- --browser Chrome""");
1876
var result = command.
Parse
("""resource web-browser-automation configure --load-arguments -- --browser Chrome""");
1915
var result = command.
Parse
("""resource argument-commands dependent-arguments --load-arguments -- --category fruit""");
1949
var result = command.
Parse
("""resource argument-commands dependent-arguments -- --category=fruit --item=banana --quantity=2 --priority=express""");
1989
var result = command.
Parse
("""resource web-browser-automation configure --no-proxy""");
2006
var result = command.
Parse
("""resource myresource --help""");
2045
var result = command.
Parse
("""resource web-browser-automation wait-for-browser --help""");
2079
var result = command.
Parse
("""resource web-browser-automation wait-for-browser --help -- --selector #main""");
2109
var result = command.
Parse
("""resource web-browser-automation custom-command -- --help""");
2147
var result = command.
Parse
("""resource web-browser-automation configure --help""");
2177
var result = command.
Parse
("""resource web-browser-automation configure --help""");
2214
var result = command.
Parse
("""resource web-browser-automation configure --help""");
2235
var result = command.
Parse
("""resource web-browser-automation configure --help""");
2261
var result = command.
Parse
("""resource web-browser-automation configure --help""");
2312
var result = command.
Parse
("""resource argument-commands all-argument-types --help""");
Commands\RestoreCommandTests.cs (2)
40
var result = command.
Parse
($"restore --apphost {appHostFile.FullName}");
78
var result = command.
Parse
($"restore --apphost {appHostFile.FullName}");
Commands\RootCommandTests.cs (11)
36
Assert.Equal(expected, command.
Parse
("test --help").Errors.Count == 0);
37
Assert.Empty(command.
Parse
("run --help").Errors);
56
var result = command.
Parse
("--version");
79
var result = command.
Parse
("-v");
104
var result = command.
Parse
("--version");
155
var result = command.
Parse
("--version");
213
var result = command.
Parse
("--help");
227
var result = command.
Parse
("--nologo --help");
246
var result = command.
Parse
("--help");
266
var result = command.
Parse
("run --capture-profile --capture-profile-output profile.zip --capture-profile-delay 1");
347
var result = command.
Parse
("--help");
Commands\RunCommandTests.cs (66)
52
var result = command.
Parse
("run --help");
91
var pendingRun = command.
Parse
($"run --apphost \"{appHostFile.FullName}\" {arguments}")
344
var result = command.
Parse
("run");
387
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
428
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
476
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
543
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
635
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
703
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
756
var result = command.
Parse
("run");
839
var pendingCommand = command.
Parse
($"run --apphost {appHostFile.FullName}")
933
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
1040
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
1138
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
1218
var result = command.
Parse
("run");
1245
var result = command.
Parse
("run");
1275
var result = command.
Parse
("run");
1293
var result = command.
Parse
("run");
1310
var result = command.
Parse
("run --apphost /tmp/doesnotexist.csproj");
1374
var result = command.
Parse
($"run --apphost {appHostProjectFile.FullName}");
1404
var result = command.
Parse
("run");
1434
var result = command.
Parse
("run");
1466
var result = command.
Parse
($"run --apphost {appHostProjectFile.FullName}");
1526
var result = command.
Parse
($"run --apphost {appHostProjectFile.FullName}");
1549
var result = command.
Parse
("run --detach");
1579
var parentResult = parentCommand.
Parse
($"run --detach --apphost {appHostFile.FullName}");
1618
var childResult = childCommand.
Parse
("run");
1694
var result = command.
Parse
("run");
1800
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
1870
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
1938
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
1995
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
2054
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
2125
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
2235
var pendingCommand = command.
Parse
($"run --apphost {appHostFile.FullName}")
2318
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
2379
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
2431
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
2503
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
2660
var result = command.
Parse
("run");
2728
var result = command.
Parse
("run");
2859
var result = command.
Parse
("run");
2917
var result = command.
Parse
("run");
2965
var result = command.
Parse
("run --capture-profile");
3008
var result = command.
Parse
("run --capture-profile");
3059
var result = command.
Parse
("run --capture-profile");
3110
var result = command.
Parse
("run");
3221
var result = command.
Parse
("run");
3327
var result = command.
Parse
("run");
3397
var result = command.
Parse
("run");
3466
var result = command.
Parse
("run --start-debug-session");
3526
var result = command.
Parse
("run");
3590
var result = command.
Parse
("run");
3657
var result = command.
Parse
("run");
3716
var result = command.
Parse
("run");
3771
var result = command.
Parse
("run");
3828
var result = command.
Parse
("run");
3887
var result = command.
Parse
("run");
4294
var result = command.
Parse
("run --no-build");
4375
var result = command.
Parse
("run --isolated");
4436
var result = command.
Parse
("run --no-build");
4452
var result = command.
Parse
("run -- --custom-arg value --launch-profile E2E");
5081
var result = command.
Parse
(explicitAppHost ? $"run --apphost \"{appHostFile.FullName}\"" : "run");
5302
var result = command.
Parse
("run --non-interactive");
5375
var result = command.
Parse
("run --no-build");
5430
var result = command.
Parse
(args);
Commands\Sdk\SdkExportCommandTests.cs (1)
374
return await command.
Parse
(commandLine).InvokeAsync().DefaultTimeout();
Commands\SdkCommandTests.cs (2)
99
var result = command.
Parse
("sdk");
114
var result = command.
Parse
("sdk --help");
Commands\SdkDumpCommandTests.cs (15)
34
var result = command.
Parse
("sdk dump --help");
56
var result = command.
Parse
($"sdk dump --format {format}");
69
var result = command.
Parse
("sdk dump /nonexistent/path/to/integration.csproj");
84
var result = command.
Parse
("sdk dump @13.2.0");
99
var result = command.
Parse
("sdk dump Aspire.Hosting.Redis@");
114
var result = command.
Parse
("sdk dump Aspire.Hosting.Redis@not-a-version!!!");
129
var result = command.
Parse
("sdk dump some-random-string");
144
var result = command.
Parse
("sdk dump Aspire.Hosting.Redis@13.2.0");
157
var result = command.
Parse
("sdk dump Aspire.Hosting.Redis@13.2.0 Aspire.Hosting.PostgreSQL@13.2.0");
170
var result = command.
Parse
("sdk dump --format ci --output-directory ./ats Aspire.Hosting.Redis@13.2.0");
183
var result = command.
Parse
("sdk dump --format ci --output ./all.ats.txt --output-directory ./ats Aspire.Hosting.Redis@13.2.0");
198
var result = command.
Parse
("sdk dump --output-directory ./ats Aspire.Hosting.Redis@13.2.0");
213
var result = command.
Parse
("sdk dump --format ci --output-directory ./ats");
228
var result = command.
Parse
("sdk dump Aspire.Hosting.Redis@13.2.0-preview.1");
243
var result = command.
Parse
("sdk dump Aspire.Hosting.Redis@@13.2.0");
Commands\SdkInstallerTests.cs (6)
46
var result = command.
Parse
("run");
71
var result = command.
Parse
("add redis");
94
var result = command.
Parse
("new aspire-starter");
133
var result = command.
Parse
("publish");
171
var result = command.
Parse
("deploy");
193
var result = command.
Parse
("run");
Commands\SecretCommandTests.cs (40)
76
var exitCode = await command.
Parse
($"secret {arguments} {environmentOption} --apphost \"{appHostFile.FullName}\"")
122
var exitCode = await command.
Parse
($"secret delete ConnectionStrings:db --apphost \"{appHostFile.FullName}\"")
167
Assert.Equal(CliExitCodes.Success, await command.
Parse
(arguments).InvokeAsync().DefaultTimeout());
175
Assert.Equal(CliExitCodes.Success, await command.
Parse
(arguments).InvokeAsync().DefaultTimeout());
201
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret path --apphost \"{appHostFile.FullName}\"").InvokeAsync().DefaultTimeout());
226
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret get ConnectionStrings:db {options}").InvokeAsync().DefaultTimeout());
228
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret set Parameters:other synthetic {options}").InvokeAsync().DefaultTimeout());
233
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret list --format json {options}").InvokeAsync().DefaultTimeout());
237
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret delete ConnectionStrings:db {options}").InvokeAsync().DefaultTimeout());
567
var result = provider.GetRequiredService<RootCommand>().
Parse
("secret set --help");
594
var result = command.
Parse
($"secret path --apphost \"{appHostFile.FullName}\"");
620
var result = command.
Parse
($"secret path --apphost \"{appHostFile.FullName}\"");
647
var setResult = command.
Parse
($"secret set --environment Production Parameters:api_key prod-secret --apphost \"{appHostFile.FullName}\"");
655
var getResult = command.
Parse
($"secret get --environment Production Parameters:api_key --apphost \"{appHostFile.FullName}\"");
662
var listResult = command.
Parse
($"secret list --environment Production --format json --apphost \"{appHostFile.FullName}\"");
668
var defaultGetResult = command.
Parse
($"secret get Parameters:api_key --apphost \"{appHostFile.FullName}\"");
673
var deleteResult = command.
Parse
($"secret delete --environment Production Parameters:api_key --apphost \"{appHostFile.FullName}\"");
678
var deletedGetResult = command.
Parse
($"secret get --environment Production Parameters:api_key --apphost \"{appHostFile.FullName}\"");
699
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret set --environment Production Parameters:key prod-secret {projectOption}").InvokeAsync().DefaultTimeout());
703
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret set Parameters:key dev-secret {projectOption}").InvokeAsync().DefaultTimeout());
709
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret get --environment Production Parameters:key {projectOption}").InvokeAsync().DefaultTimeout());
713
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret list --all --format json {projectOption}").InvokeAsync().DefaultTimeout());
717
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret delete --environment Production Parameters:key {projectOption}").InvokeAsync().DefaultTimeout());
718
Assert.Equal(CliExitCodes.ConfigNotFound, await command.
Parse
($"secret get --environment Production Parameters:key {projectOption}").InvokeAsync().DefaultTimeout());
733
Assert.Equal(CliExitCodes.Success, await command.
Parse
(
737
Assert.Equal(CliExitCodes.Success, await command.
Parse
(
763
var setDevelopmentResult = command.
Parse
($"secret set Parameters:api_key dev-secret --apphost \"{appHostFile.FullName}\"");
770
var setProductionResult = command.
Parse
($"secret set --environment Production Azure:SubscriptionId prod-subscription --apphost \"{appHostFile.FullName}\"");
776
var listAllResult = command.
Parse
($"secret list --all --format json --apphost \"{appHostFile.FullName}\"");
816
var getLegacyResult = command.
Parse
($"secret get Legacy:Value --apphost \"{appHostFile.FullName}\"");
822
var setResult = command.
Parse
($"secret set New:Value new --apphost \"{appHostFile.FullName}\"");
860
var result = command.
Parse
($"secret {arguments} --environment \"{environment}\"");
882
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret set Parameters:key initial -e {originalEnvironment} {projectOption}").InvokeAsync().DefaultTimeout());
883
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret set Parameters:key updated -e {alternateEnvironment} {projectOption}").InvokeAsync().DefaultTimeout());
886
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret get Parameters:key -e {alternateEnvironment} {projectOption}").InvokeAsync().DefaultTimeout());
890
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret list --all --format json {projectOption}").InvokeAsync().DefaultTimeout());
896
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret path -e {alternateEnvironment} {projectOption}").InvokeAsync().DefaultTimeout());
899
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret delete Parameters:key -e {alternateEnvironment} {projectOption}").InvokeAsync().DefaultTimeout());
900
Assert.Equal(CliExitCodes.ConfigNotFound, await command.
Parse
($"secret get Parameters:key -e {originalEnvironment} {projectOption}").InvokeAsync().DefaultTimeout());
930
var exitCode = await command.
Parse
($"secret {arguments} -e Production --apphost \"{appHostFile.FullName}\"")
Commands\StartCommandTests.cs (30)
49
var result = command.
Parse
("start");
67
var result = command.
Parse
("start --help");
87
var result = command.
Parse
("start --help");
104
var result = command.
Parse
("start --no-build --help");
118
var result = command.
Parse
("start --format json --help");
132
var result = command.
Parse
("start --isolated --help");
215
var result = command.
Parse
("start");
233
var result = command.
Parse
("start -- --custom-arg value --launch-profile E2E");
319
var result = command.
Parse
("start");
349
var result = command.
Parse
("start --format json");
394
var result = command.
Parse
($"start --apphost {appHostFile.FullName}");
510
var result = command.
Parse
("start");
539
var result = command.
Parse
($"start --apphost {appHostFile.FullName} --start-debug-session");
564
var result = provider.GetRequiredService<RootCommand>().
Parse
($"start --apphost {appHostFile.FullName}");
602
var result = command.
Parse
($"start --apphost {appHostFile.FullName}");
638
var result = command.
Parse
(string.Format(CultureInfo.InvariantCulture, commandTemplate, appHostFile.FullName));
660
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("start"), appHostFile, new TestFeatures()));
661
Assert.True(AppHostLauncher.ResolveIsolated(command.
Parse
("start"), appHostFile, features));
662
Assert.True(AppHostLauncher.ResolveIsolated(command.
Parse
("start --isolated"), appHostFile, features));
663
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("start --isolated false"), appHostFile, features));
664
Assert.True(AppHostLauncher.ResolveIsolated(command.
Parse
("run"), appHostFile, features));
665
Assert.True(AppHostLauncher.ResolveIsolated(command.
Parse
("run --isolated"), appHostFile, features));
666
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("run --isolated false"), appHostFile, features));
680
Assert.Equal(expected, AppHostLauncher.GetExplicitIsolated(command.
Parse
(commandLine)));
695
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("start"), appHostFile, features));
696
Assert.True(AppHostLauncher.ResolveIsolated(command.
Parse
("start --isolated"), appHostFile, features));
697
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("start --isolated false"), appHostFile, features));
698
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("run"), appHostFile, features));
699
Assert.True(AppHostLauncher.ResolveIsolated(command.
Parse
("run --isolated"), appHostFile, features));
700
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("run --isolated false"), appHostFile, features));
Commands\StopCommandTests.cs (47)
38
var result = command.
Parse
("stop --help");
53
var result = command.
Parse
("stop myresource");
198
var exitCode = await command.
Parse
(commandLine).InvokeAsync().DefaultTimeout();
217
var result = provider.GetRequiredService<RootCommand>().
Parse
(commandLine);
245
var result = provider.GetRequiredService<RootCommand>().
Parse
($"stop --pid {int.MaxValue - 1}");
285
.
Parse
($"stop --pid {int.MaxValue - 1}").InvokeAsync().DefaultTimeout();
315
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
(commandLine).InvokeAsync().DefaultTimeout();
339
var result = command.
Parse
("stop --apphost missing-directory");
370
var result = command.
Parse
($"stop --apphost \"{appHostDirectory.FullName}\"");
404
var result = command.
Parse
("stop --all");
440
var result = command.
Parse
("stop --all");
476
var result = command.
Parse
("stop");
529
var result = command.
Parse
("stop");
563
var result = command.
Parse
($"stop --apphost \"{appHostFile.FullName}\"");
604
var result = command.
Parse
("stop");
643
var result = command.
Parse
("stop");
685
var result = command.
Parse
("stop --all");
726
var result = command.
Parse
(commandLine);
762
var result = command.
Parse
($"stop --force{volumesOption} --apphost \"{appHostFile.FullName}\"");
796
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
842
var result = command.
Parse
("stop --force");
880
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
914
var result = command.
Parse
("stop --force");
953
var result = command.
Parse
("stop --force");
990
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1033
var result = command.
Parse
($"stop --force{volumesOption} --apphost \"{appHostFile.FullName}\"");
1073
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1112
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1156
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1198
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1240
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1278
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1316
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1350
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1387
var result = command.
Parse
("stop --force");
1425
var result = command.
Parse
("stop --force");
1445
var result = command.
Parse
("stop --force --all");
1467
var result = command.
Parse
("stop --volumes");
1506
var result = command.
Parse
("stop");
1533
var exitCode = await command.
Parse
("stop --all").InvokeAsync().DefaultTimeout();
1570
var exitCode = await command.
Parse
("stop --all --non-interactive").InvokeAsync().DefaultTimeout();
1611
var exitCode = await command.
Parse
("stop --all --wait --non-interactive").InvokeAsync().DefaultTimeout();
1646
var exitCode = await command.
Parse
(commandLine).InvokeAsync().DefaultTimeout();
1699
var exitCode = await command.
Parse
(commandLine).InvokeAsync().DefaultTimeout();
1730
var exitCode = await command.
Parse
(commandLine).InvokeAsync().DefaultTimeout();
1760
var exitCode = await command.
Parse
("stop --wait --non-interactive").InvokeAsync().DefaultTimeout();
1796
var exitCode = await command.
Parse
("stop --force --wait").InvokeAsync().DefaultTimeout();
Commands\TelemetryCommandTests.cs (3)
32
var result = command.
Parse
("otel");
297
var result = command.
Parse
($"otel {otelCommand} --dashboard-url http://localhost:18888");
383
var result = command.
Parse
(
Commands\TelemetryFollowTests.cs (1)
276
var parsed = command.
Parse
($"otel {commandName} --format Json{(follow ? " --follow" : "")}{(standalone ? " --dashboard-url http://localhost:18888" : "")}");
Commands\TelemetryLogsCommandTests.cs (16)
30
var result = command.
Parse
("otel logs");
48
var result = command.
Parse
($"telemetry logs --limit {limitValue}");
74
var result = command.
Parse
("otel logs");
109
var result = command.
Parse
("otel logs");
139
var result = command.
Parse
("otel logs");
219
var result = command.
Parse
("otel logs --dashboard-url http://localhost:18888");
271
var result = command.
Parse
("otel logs --dashboard-url http://localhost:18888 --api-key my-secret-key");
293
var result = command.
Parse
("otel logs --dashboard-url http://localhost:18888 --apphost TestAppHost.csproj");
359
var result = command.
Parse
("otel logs --dashboard-url http://localhost:18888");
402
var result = command.
Parse
("otel logs --dashboard-url http://localhost:18888");
441
var result = command.
Parse
("otel logs --dashboard-url http://localhost:18888");
471
var result = command.
Parse
("otel logs --dashboard-url http://localhost:18888/login?t=sometoken");
511
var result = command.
Parse
("otel logs --dashboard-url http://localhost:18888");
567
var result = command.
Parse
("otel logs --dashboard-url http://localhost:18888/login?t=abc123");
649
var result = command.
Parse
("otel logs --format json --dashboard-url http://localhost:18888");
715
var result = command.
Parse
("otel logs --dashboard-url http://localhost:18888 --search timeout");
Commands\TelemetrySpansCommandTests.cs (12)
29
var result = command.
Parse
("otel spans");
47
var result = command.
Parse
($"telemetry spans --limit {limitValue}");
73
var result = command.
Parse
("otel spans");
104
var result = command.
Parse
("otel spans");
137
var result = command.
Parse
("otel spans");
221
var result = command.
Parse
("otel spans --dashboard-url http://localhost:18888");
245
var result = command.
Parse
("otel spans --dashboard-url http://localhost:18888 --apphost TestAppHost.csproj");
283
var result = command.
Parse
("otel spans --dashboard-url http://localhost:18888");
323
var result = command.
Parse
("otel spans --dashboard-url http://localhost:18888");
407
var result = command.
Parse
("otel spans --format json --dashboard-url http://localhost:18888");
478
var result = command.
Parse
("otel spans --dashboard-url http://localhost:18888 --search \"GET /index\"");
525
var result = command.
Parse
("otel spans --dashboard-url http://localhost:18888 --search \"duration:>=50.5\"");
Commands\TelemetryTracesCommandTests.cs (16)
32
var result = command.
Parse
("otel traces");
130
var result = command.
Parse
("otel traces --format json -n 5");
216
var result = command.
Parse
("otel traces --format json -n 5 --dashboard-url http://dashboard.dev.localhost:18888");
245
var result = command.
Parse
($"telemetry traces --limit {limitValue}");
271
var result = command.
Parse
("otel traces");
322
var result = command.
Parse
("otel traces");
369
var result = command.
Parse
("otel traces");
535
var result = command.
Parse
("otel traces --trace-id abc1234567890def");
702
var result = command.
Parse
("otel traces --trace-id abc1234567890def");
756
var result = command.
Parse
("otel traces --dashboard-url http://localhost:18888");
780
var result = command.
Parse
("otel traces --dashboard-url http://localhost:18888 --apphost TestAppHost.csproj");
818
var result = command.
Parse
("otel traces --dashboard-url http://localhost:18888");
901
var result = command.
Parse
("otel traces --format json --dashboard-url http://localhost:18888");
985
var result = command.
Parse
("otel traces --trace-id abc1234567890def --format json --dashboard-url http://localhost:18888");
1034
var result = command.
Parse
("otel traces --dashboard-url http://localhost:18888 --search frontend");
1081
var result = command.
Parse
("otel traces --dashboard-url http://localhost:18888 --search \"duration:>=50.5\"");
Commands\TerminalCommandTests.cs (21)
26
var result = command.
Parse
("terminal --help");
42
var result = command.
Parse
("terminal");
56
var result = command.
Parse
("terminal attach");
70
var result = command.
Parse
("terminal attach myresource");
90
var result = command.
Parse
("terminal attach myresource");
110
var result = command.
Parse
("terminal attach does-not-exist");
135
var result = command.
Parse
("terminal attach myresource");
160
var result = command.
Parse
("terminal attach myresource");
178
var result = provider.GetRequiredService<RootCommand>().
Parse
(arguments);
215
var result = provider.GetRequiredService<RootCommand>().
Parse
(
256
var result = command.
Parse
("terminal attach myresource");
311
var result = command.
Parse
("terminal attach myresource" + options);
329
var result = command.
Parse
("terminal ps");
352
var result = command.
Parse
("terminal ps");
376
var result = command.
Parse
("terminal ps");
423
var result = command.
Parse
("terminal ps");
458
var result = command.
Parse
("terminal ps --format json");
581
var result = command.
Parse
("terminal ps --format json --verbose");
692
var result = command.
Parse
("terminal ps --format json");
764
var result = command.
Parse
("terminal ps --format json");
804
var result = command.
Parse
("terminal ps --format json");
Commands\TerminalCommandViewerOptionTests.cs (3)
26
var result = command.
Parse
("terminal attach --help");
54
var result = command.
Parse
("terminal attach myresource");
69
var result = command.
Parse
("terminal attach myresource --viewer");
Commands\TerminalTapePlayCommandTests.cs (14)
32
var result = provider.GetRequiredService<RootCommand>().
Parse
(arguments);
44
var result = provider.GetRequiredService<RootCommand>().
Parse
("terminal tape play shell --tape-file probe.tape");
104
var result = provider.GetRequiredService<RootCommand>().
Parse
("terminal tape play shell --tape-file probe.tape");
177
var result = provider.GetRequiredService<RootCommand>().
Parse
(
244
var result = provider.GetRequiredService<RootCommand>().
Parse
(
290
var result = provider.GetRequiredService<RootCommand>().
Parse
(
344
var result = provider.GetRequiredService<RootCommand>().
Parse
(
451
var invalid = command.
Parse
("terminal tape play shell --tape-file play.tape");
458
var valid = command.
Parse
("terminal tape play shell --tape-file play.tape");
476
var result = provider.GetRequiredService<RootCommand>().
Parse
("terminal tape play shell --tape-file wait.tape");
494
var result = provider.GetRequiredService<RootCommand>().
Parse
("terminal tape play shell --tape-file wait.tape --timeout 5");
513
var result = provider.GetRequiredService<RootCommand>().
Parse
("terminal tape play shell --tape-file wait.tape");
532
var result = provider.GetRequiredService<RootCommand>().
Parse
("terminal tape play shell --tape-file wait.tape");
550
var result = provider.GetRequiredService<RootCommand>().
Parse
("terminal tape play shell --tape-file probe.tape");
Commands\TestCommandTests.cs (6)
435
await provider.GetRequiredService<RootCommand>().
Parse
($"test {options}").InvokeAsync().DefaultTimeout());
899
Assert.Equal(0, await provider.GetRequiredService<RootCommand>().
Parse
("test --help").InvokeAsync().DefaultTimeout());
1129
var execution = provider.GetRequiredService<RootCommand>().
Parse
("test")
1382
var result = await provider.GetRequiredService<RootCommand>().
Parse
("test --timeout-seconds 10")
1423
var execution = provider.GetRequiredService<RootCommand>().
Parse
("test --timeout-seconds 1 --format json")
1474
var execution = provider.GetRequiredService<RootCommand>().
Parse
("test --timeout-seconds 1")
Commands\TrayCommandTests.cs (22)
38
.
Parse
($"tray {action} --non-interactive --nologo").InvokeAsync().DefaultTimeout());
64
.
Parse
("tray start --non-interactive --nologo").InvokeAsync().DefaultTimeout());
82
.
Parse
("tray start --non-interactive --nologo").InvokeAsync().DefaultTimeout());
115
.
Parse
("tray start --non-interactive --nologo").InvokeAsync().DefaultTimeout());
138
.
Parse
("tray start --non-interactive --nologo").InvokeAsync().DefaultTimeout());
152
.
Parse
("tray start --non-interactive --nologo").InvokeAsync().DefaultTimeout());
168
.
Parse
("tray start --non-interactive --nologo").InvokeAsync().DefaultTimeout());
213
.
Parse
($"tray {action} --non-interactive --nologo").InvokeAsync();
254
Assert.Equal(CliExitCodes.Success, await command.
Parse
("tray start --non-interactive --nologo").InvokeAsync().DefaultTimeout());
294
.
Parse
($"tray {action}").InvokeAsync().DefaultTimeout());
328
.
Parse
("tray start").InvokeAsync().DefaultTimeout());
368
.
Parse
($"tray {action}").InvokeAsync().DefaultTimeout());
400
.
Parse
($"tray {action}").InvokeAsync().DefaultTimeout());
430
.
Parse
($"tray {action}").InvokeAsync().DefaultTimeout());
468
.
Parse
($"tray {action}").InvokeAsync(cancellationToken: cancellation.Token);
521
.
Parse
("tray start").InvokeAsync(cancellationToken: cancellation.Token);
559
.
Parse
($"tray {action}").InvokeAsync(cancellationToken: cancellation.Token).DefaultTimeout();
574
var result = provider.GetRequiredService<RootCommand>().
Parse
(arguments);
595
Assert.Equal(CliExitCodes.Success, await command.
Parse
("tray --help").InvokeAsync().DefaultTimeout());
658
.
Parse
($"tray {action}").InvokeAsync().DefaultTimeout());
679
.
Parse
(start ? "tray start" : "tray stop").InvokeAsync().DefaultTimeout());
723
.
Parse
($"tray {action}").InvokeAsync().DefaultTimeout());
Commands\TrayProtocolCommandTests.cs (6)
38
var result = command.
Parse
($"ps {outputOption} --follow --format json --non-interactive --nologo");
72
.
Parse
("ps --output snapshot --follow --format json --non-interactive --nologo")
95
var result = provider.GetRequiredService<RootCommand>().
Parse
(arguments);
118
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
(arguments).InvokeAsync().DefaultTimeout();
240
var result = provider.GetRequiredService<RootCommand>().
Parse
($"stop {options} --apphost \"{path}\"");
288
var result = provider.GetRequiredService<RootCommand>().
Parse
(
Commands\UpdateCommandRepositoryToolsTests.cs (8)
60
.
Parse
("update --channel stable --dry-run --non-interactive").InvokeAsync().DefaultTimeout();
107
.
Parse
("update --channel stable --yes --non-interactive").InvokeAsync().DefaultTimeout();
204
.
Parse
("update --channel stable --yes --non-interactive").InvokeAsync().DefaultTimeout();
255
.
Parse
("update --channel stable --yes --non-interactive").InvokeAsync().DefaultTimeout();
320
.
Parse
("update --channel stable").InvokeAsync().DefaultTimeout();
384
.
Parse
("update --self --yes --non-interactive").InvokeAsync().DefaultTimeout();
423
.
Parse
("update --channel stable --yes --non-interactive").InvokeAsync().DefaultTimeout();
584
.
Parse
(dryRun ? "update --channel daily --dry-run --non-interactive" : "update --channel daily")
Commands\UpdateCommandTests.cs (55)
40
var result = command.
Parse
("update --help");
73
var result = command.
Parse
(commandLine);
125
var result = command.
Parse
($"update --apphost {appHostProjectFile.FullName}");
174
var result = command.
Parse
($"update --apphost AppHost.csproj");
287
var result = command.
Parse
("update");
364
var result = command.
Parse
("update --apphost AppHost.csproj --channel stable");
414
var exitCode = await command.
Parse
("update --apphost apphost.ts --channel stable --migrate --yes")
478
var result = command.
Parse
("update --apphost apphost.ts");
537
var result = command.
Parse
("update --apphost apphost.ts");
592
var result = command.
Parse
("update --apphost apphost.ts");
669
var result = command.
Parse
("update --apphost AppHost.csproj --channel stable");
748
var result = command.
Parse
("update --apphost AppHost.csproj --channel stable");
825
var result = command.
Parse
("update --apphost AppHost.csproj --channel stable");
868
var result = command.
Parse
("update --apphost AppHost.csproj");
911
var result = command.
Parse
("update --apphost AppHost.csproj --yes");
985
var result = command.
Parse
("update --apphost AppHost.csproj --channel pr-12658");
1058
var result = command.
Parse
("update --apphost AppHost.csproj --channel pr-12658");
1092
var result = command.
Parse
("update --apphost AppHost.csproj --migrate --yes");
1128
var result = command.
Parse
("update --apphost AppHost.csproj --migrate");
1155
var result = command.
Parse
("update --apphost AppHost.csproj --migrate --yes");
1185
var result = command.
Parse
("update --apphost AppHost.csproj --migrate --yes");
1269
var result = command.
Parse
("update --self");
1301
var result = command.
Parse
("update --self");
1336
var result = command.
Parse
("update --self");
1460
var result = command.
Parse
(commandLine);
1491
var result = command.
Parse
("update --self");
1529
var result = command.
Parse
("update");
1573
var result = command.
Parse
("update --self --channel daily");
1600
var result = command.
Parse
($"update --self --channel {requestedChannel}");
1636
var result = command.
Parse
("update --self --channel staging");
1680
var result = command.
Parse
("update --self --channel staging");
1725
var result = command.
Parse
("update --self --quality daily");
1766
var result = command.
Parse
("update --self --channel daily");
1829
var result = command.
Parse
("update --channel daily");
1894
var result = command.
Parse
("update --quality daily");
1948
var result = command.
Parse
("update --quality invalid");
2015
var result = command.
Parse
("update --channel stable --quality daily");
2079
var result = command.
Parse
("update");
2141
var result = command.
Parse
("update");
2299
var result = command.
Parse
("update");
2366
var result = command.
Parse
(channelFromConfig ? "update" : "update --channel staging");
2601
var result = command.
Parse
("update");
2675
var result = command.
Parse
("update");
2760
var result = command.
Parse
("update");
2816
var result = command.
Parse
($"update --apphost \"{appHostFile.FullName}\"");
3003
var result = provider.GetRequiredService<RootCommand>().
Parse
(arguments);
3301
var result = command.
Parse
(updateArgs);
3339
var result = command.
Parse
("update --self");
3380
var result = command.
Parse
("update --self");
3425
var result = command.
Parse
("update --self");
3470
var result = command.
Parse
("update --self");
3504
var result = command.
Parse
("update --self --channel stable");
3570
var result = command.
Parse
("update --yes --channel stable --non-interactive");
3690
var result = command.
Parse
(updateArgs);
3856
var result = command.
Parse
(commandLine);
Commands\WaitCommandTests.cs (15)
26
var result = command.
Parse
("wait --help");
41
var result = command.
Parse
("wait");
56
var result = command.
Parse
("wait myresource --help");
70
var result = command.
Parse
("wait myresource --apphost /path/to/project.csproj --help");
84
var result = command.
Parse
("wait myresource --status up --help");
98
var result = command.
Parse
("wait myresource --timeout 60 --help");
115
var result = command.
Parse
($"wait myresource --status {status} --help");
132
var result = command.
Parse
($"wait myresource --status {status} --help");
164
var result = command.
Parse
("wait nonexistent --timeout 5");
206
var result = command.
Parse
("wait myapp --status up --timeout 5");
242
var result = command.
Parse
("wait mydb --status healthy --timeout 5");
274
var result = command.
Parse
("wait mydb --status healthy --timeout 2");
310
var result = command.
Parse
("wait worker --status down --timeout 5");
342
var result = command.
Parse
("wait myapp --status up --timeout 5");
384
var result = command.
Parse
("wait myapp --status down --timeout 5");
Configuration\ConfigSourceServiceTests.cs (1)
2244
return command.
Parse
(accepted switch
Interaction\ConsoleInteractionServiceTests.cs (27)
254
var source = await service.ResolveAndAcquireConfigSourceAsync(command.
Parse
("--use-config-source false"), ConfigSourceStrings.NewUseSourcePrompt, CancellationToken.None);
292
var source = await service.ResolveAndAcquireConfigSourceAsync(command.
Parse
("--use-config-source"), ConfigSourceStrings.NewUseSourcePrompt, CancellationToken.None);
329
var source = await service.ResolveAndAcquireConfigSourceAsync(command.
Parse
("--use-config-source false"), ConfigSourceStrings.NewUseSourcePrompt, CancellationToken.None);
591
var binding = PromptBinding.Create(new RootCommand { option }.
Parse
("--template second"), option);
2071
var parseResult = command.
Parse
("--value bad-value");
2154
var parseResult = command.
Parse
("");
2184
var parseResult = command.
Parse
("");
2201
var parseResult = command.
Parse
("");
2283
var parseResult = command.
Parse
("");
2295
var parseResult = command.
Parse
("");
2311
var parseResult = command.
Parse
("");
2341
var parseResult = command.
Parse
("--choice invalid");
2363
var parseResult = command.
Parse
("--items invalid");
2390
var parseResult = command.
Parse
("--items invalid");
2416
var parseResult = command.
Parse
("--items invalid");
2448
var parseResult = command.
Parse
("--items invalid");
2474
var parseResult = command.
Parse
("");
2492
var parseResult = command.
Parse
("--choice option1");
2510
var parseResult = command.
Parse
("--items alpha,gamma");
2525
var parseResult = command.
Parse
("--yes");
2537
var parseResult = command.
Parse
("--include");
2599
var parseResult = command.
Parse
("");
2616
var parseResult = command.
Parse
("--choice option1");
2635
var parseResult = command.
Parse
("--items alpha,gamma");
2654
var parseResult = command.
Parse
("");
2673
var parseResult = command.
Parse
("");
2690
var binding = PromptBinding.Create(command.
Parse
(""), option, "copilot,claude,opencode");
NuGet\NuGetPackagePrefetcherTests.cs (4)
57
command.SelectForExecution(command.
Parse
("ls"));
77
command.SelectForExecution(command.
Parse
("ls"));
296
var parseResult = newCommand.
Parse
(commandLine);
517
command.SelectForExecution(parseResult ?? command.
Parse
(commandLine));
Templating\JavaStarterScaffoldTests.cs (1)
147
var parseResult = newCommand.
Parse
(
dotnet-aot (1)
parent\dotnet\Parser.cs (1)
473
public static ParseResult Parse(string commandLineUnsplit) => RootCommand.
Parse
(commandLineUnsplit, ParserConfiguration);
dotnet-watch (1)
CommandLine\CommandLineOptions.cs (1)
137
.Where(arg => !msbuildCommandDefinition.
Parse
(arg).HasOption(msbuildCommandDefinition.TargetOption))
Infrastructure.Tests (1)
TemplateManifest\TemplateManifestCommandTests.cs (1)
94
var exitCode = await command.
Parse
("--help").InvokeAsync(new InvocationConfiguration { Output = help, Error = errors });
Microsoft.TemplateEngine.Cli (1)
Commands\create\InstantiateCommand.TabCompletion.cs (1)
67
ParseResult parseResult = parser.
Parse
(context.CommandLineText, ParserFactory.ParserConfiguration);
System.CommandLine (1)
Completions\CompletionAction.cs (1)
29
var completionParseResult = parseResult.RootCommandResult.Command.
Parse
(commandLineToComplete, parseResult.Configuration);