1113 references to Parse
aspire (1)
Completions\CompletionInvocation.cs (1)
94
return WriteCompletions(command.
Parse
(args[1]).GetCompletions(position), output);
Aspire.Cli.Tests (1107)
CliBootstrapTests.cs (2)
452
var parseResult = command.
Parse
(commandLine);
473
var parseResult = command.
Parse
("ls");
Commands\AddCommandTests.cs (67)
34
var result = command.
Parse
("add --help");
48
var result = command.
Parse
("integration add --help");
77
var result = command.
Parse
("integration search redis --json");
108
var result = command.
Parse
("integration search --format json");
186
var result = command.
Parse
("integration list --format json");
234
var result = command.
Parse
(commandLine);
259
var result = command.
Parse
("integration list");
309
var result = command.
Parse
("integration search redis --format json");
355
var result = command.
Parse
("integration search rdis --format json");
442
var result = command.
Parse
($"integration search redis --apphost \"{appHostFile.FullName}\" --format json");
514
var result = command.
Parse
($"integration search redis --apphost \"{appHostFile.FullName}\" --format json");
601
var result = command.
Parse
($"integration search foundry --apphost \"{appHostFile.FullName}\" --format json");
696
var result = command.
Parse
($"integration search redis --apphost \"{appHostFile.FullName}\" --format json");
778
var result = command.
Parse
($"{commandText} --apphost \"{appHostFile.FullName}\" --format json");
827
var result = command.
Parse
($"integration search redis --apphost \"{appHostFile.FullName}\" --format json");
910
var result = command.
Parse
($"integration search foundry --apphost \"{appHostFile.FullName}\" --format json");
968
var result = command.
Parse
("integration list --format json");
1021
var result = command.
Parse
("integration search azure --format json");
1105
var result = command.
Parse
("add");
1183
var result = command.
Parse
("add docker");
1266
var result = command.
Parse
("add docker --version 9.2.0");
1346
var result = command.
Parse
("add docker --version 9.2.0");
1421
var result = command.
Parse
("add redis --version 13.2.0");
1490
var result = command.
Parse
("add redis --version 13.2.0");
1581
var result = command.
Parse
("add redis --version 13.2.0");
1652
var result = command.
Parse
($"add {integrationName}");
1726
var result = command.
Parse
("add redis --version 13.2.0");
1801
var result = command.
Parse
("add --version 13.2.0");
1872
var result = command.
Parse
("add --version 13.2.0");
1942
var result = command.
Parse
("add redis --version 13.2.0");
2019
var result = command.
Parse
("add redis --version 13.2.0");
2103
var result = command.
Parse
("add red");
2186
var result = command.
Parse
($"add redis --source {expectedSource}");
2210
var result = command.
Parse
($"add redis --source {source}");
2244
var result = command.
Parse
("add");
2319
var result = command.
Parse
("add nonexistentpackage");
2727
var result = command.
Parse
($"add {packageId} --apphost \"{appHostFile.FullName}\"");
2799
var result = command.
Parse
($"add Aspire.Hosting.Azure.Storage --apphost \"{appHostFile.FullName}\"");
2857
var result = command.
Parse
("add redis");
2925
var result = command.
Parse
("add redis");
3172
var result = command.
Parse
("add redis");
3241
var result = command.
Parse
("add redis");
3291
var result = command.
Parse
($"add Aspire.Hosting.Foo --apphost \"{appHostFile.FullName}\"");
3351
var result = command.
Parse
($"add {integrationName} --apphost \"{appHostFile.FullName}\"{sourceArgument}");
3401
var result = command.
Parse
($"add redis --apphost \"{appHostFile.FullName}\" --source ./feed");
3462
var result = command.
Parse
($"add Aspire.Hosting.Redis --apphost \"{appHostFile.FullName}\"");
3514
var result = command.
Parse
($"add Aspire.Hosting.Foo --all --apphost \"{appHostFile.FullName}\"");
3560
var result = command.
Parse
($"integration list --apphost \"{appHostFile.FullName}\" --format json");
3608
var result = command.
Parse
($"integration list --apphost \"{appHostFile.FullName}\"");
3655
var result = command.
Parse
($"integration list --apphost \"{appHostFile.FullName}\"");
3704
var result = command.
Parse
($"integration search zzznomatch --apphost \"{appHostFile.FullName}\"");
3762
var result = command.
Parse
($"add Aspire.Hosting.Foo --apphost \"{appHostFile.FullName}\"");
3816
var result = command.
Parse
($"add Aspire.Hosting.Redis --apphost \"{appHostFile.FullName}\"");
3862
var result = command.
Parse
($"integration list --apphost \"{appHostFile.FullName}\" --format json");
4028
var result = command.
Parse
("add postgre");
4095
var result = command.
Parse
("add kube");
4148
var result = command.
Parse
("add kubernetes");
4205
var result = command.
Parse
("add kube");
4270
var result = command.
Parse
("add zzzzzzzzzz");
4324
var result = command.
Parse
("add postgre --version 9.2.0");
4376
var result = command.
Parse
("add nonexistentpackage --version 9.2.0");
4462
var result = command.
Parse
("add sql");
4543
var result = command.
Parse
("add sql --version 13.2.0");
4626
var result = command.
Parse
("add sql --version 13.2.0");
4714
var result = command.
Parse
("add nonexistentpackage --version 13.2.0");
4801
var result = command.
Parse
("add nonexistentpackage --version 13.2.0");
4878
var result = command.
Parse
("add azureapp");
Commands\AgentInitClientSelectionTests.cs (37)
37
var result = provider.GetRequiredService<RootCommand>().
Parse
(
91
var result = provider.GetRequiredService<RootCommand>().
Parse
(
116
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init --skills aspire --mcp=false");
165
var result = provider.GetRequiredService<RootCommand>().
Parse
(
217
var result = provider.GetRequiredService<RootCommand>().
Parse
(
243
var result = provider.GetRequiredService<RootCommand>().
Parse
(
271
var result = command.
Parse
($"agent init {options}");
285
var result = provider.GetRequiredService<RootCommand>().
Parse
($"agent init --scope {value}");
301
var result = provider.GetRequiredService<RootCommand>().
Parse
($"{command} --agent copilot");
334
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init --skills all --mcp");
383
var result = provider.GetRequiredService<RootCommand>().
Parse
(
425
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init");
457
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init --skills none");
479
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init --agents COPILOT,copilot,OpenCode --skills aspire");
502
var result = provider.GetRequiredService<RootCommand>().
Parse
($"agent init --agents all --scope {scope} --skills none --mcp");
528
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init --agents copilot,claude --skills none --mcp");
547
var result = provider.GetRequiredService<RootCommand>().
Parse
($"agent init --agents {client} --scope {scope} --skills none --mcp");
576
var result = provider.GetRequiredService<RootCommand>().
Parse
(
597
var result = command.
Parse
($"agent init --agents {client} --skills none --mcp");
625
var result = provider.GetRequiredService<RootCommand>().
Parse
(
669
var result = provider.GetRequiredService<RootCommand>().
Parse
(
730
var result = provider.GetRequiredService<RootCommand>().
Parse
(
765
var result = provider.GetRequiredService<RootCommand>().
Parse
(
806
var result = provider.GetRequiredService<RootCommand>().
Parse
(
859
var result = provider.GetRequiredService<RootCommand>().
Parse
(
897
var result = provider.GetRequiredService<RootCommand>().
Parse
(
924
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init --agents opencode --scope global --skills none --mcp");
960
var result = provider.GetRequiredService<RootCommand>().
Parse
("agent init --agents all --scope global --skills none --mcp");
994
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1024
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1056
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1109
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1140
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1179
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1213
var result = provider.GetRequiredService<RootCommand>().
Parse
(
1237
var result = provider.GetRequiredService<RootCommand>().
Parse
($"agent init --agents claude --scope {scope} --skills aspire");
1248
var result = provider.GetRequiredService<RootCommand>().
Parse
("mcp init --agents claude --scope project --skills aspire --mcp");
Commands\AgentInitCommandTests.cs (28)
44
var result = command.
Parse
("agent init --agents copilot --scope global");
77
var result = command.
Parse
("agent init --agents copilot");
121
var result = command.
Parse
("agent init");
143
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --skills all");
201
var result = command.
Parse
("agent init");
248
var result = command.
Parse
("agent init");
312
var result = command.
Parse
("agent init");
359
var result = command.
Parse
("agent init");
378
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --skills {FakeAspireSkillsInstaller.AspireMonitoringSkillName}");
421
var result = command.
Parse
($"agent init --workspace-root \"{workspace.WorkspaceRoot.FullName}\" --agents all --scope project{selection}");
464
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --skills PLAYWRIGHT-CLI");
507
var result = command.
Parse
("agent init");
525
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents none --skills all");
545
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skills none");
561
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all");
607
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --skills {skillsArg}");
630
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --skills {FakeAspireSkillsInstaller.AspireOrchestrationSkillName}");
650
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents invalid --skills all");
667
var result = command.
Parse
("agent init --agents copilot");
699
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all");
791
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --skills none");
810
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all");
827
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --mcp");
844
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --mcp=false");
862
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents none --skills all");
882
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents copilot --skills {CommonAgentApplicators.AspireSkillName}");
979
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents copilot --scope global --skills aspire");
1013
var result = command.
Parse
($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents copilot --scope global --skills aspire");
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 (25)
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");
335
var result = provider.GetRequiredService<RootCommand>().
Parse
("ps");
368
var result = provider.GetRequiredService<RootCommand>().
Parse
("ps");
398
var result = command.
Parse
("add SomePackage");
433
var result = command.
Parse
("run");
456
var result = command.
Parse
("ps");
485
var result = command.
Parse
("ps");
538
var result = command.
Parse
("run");
577
var result = command.
Parse
("run");
613
var result = command.
Parse
(args);
641
var result = command.
Parse
("run --apphost somepath");
669
var result = command.
Parse
($"run {optionName}={value}");
715
var result = command.
Parse
("run --custom-arg value");
741
var result = command.
Parse
("run -- --AppHost somepath");
762
var result = command.
Parse
("run --AppHost foo -- --AppHost bar");
781
var result = command.
Parse
("add --AppHost somepath");
802
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 (53)
95
var result = command.
Parse
("config");
109
var result = command.
Parse
("config");
123
var result = command.
Parse
("config set foo bar");
147
var setLlmsResult = command.
Parse
("config set docs.llmsTxtUrl http://localhost:4321/llms-small.txt");
151
var setSitemapResult = command.
Parse
("config set docs.api.sitemapUrl http://localhost:4321/sitemap-0.xml");
183
var result = command.
Parse
("config set certificates.nssDbPaths firefox=/profiles/firefox --global");
226
var result = command.
Parse
($"config set {AspireConfigContainerTunnel.BaseImageConfigKey} {image}");
262
var result = command.
Parse
("config set foo.bar baz");
287
var result = command.
Parse
("config set foo.bar.baz hello");
317
var result1 = command.
Parse
("config set foo primitive");
322
var result2 = command.
Parse
("config set foo.bar nested");
347
var setResult = command1.
Parse
("config set testkey testvalue");
358
var getResult = command2.
Parse
("config get testkey");
373
var setResult = command1.
Parse
("config set level1.level2.level3 nestedvalue");
383
var getResult = command2.
Parse
("config get level1.level2.level3");
396
var result = command.
Parse
("config get nonexistent.key");
412
var setResult = command.
Parse
("config set deletekey deletevalue");
417
var deleteResult = command.
Parse
("config delete deletekey");
422
var getResult = command.
Parse
("config get deletekey");
437
var setResult = command.
Parse
("config set deep.nested.value test");
442
var deleteResult = command.
Parse
("config delete deep.nested.value");
466
var setResult1 = command.
Parse
("config set flatkey flatvalue");
470
var setResult2 = command.
Parse
("config set nested.key nestedvalue");
474
var setResult3 = command.
Parse
("config set deep.nested.key deepvalue");
479
var listResult = command.
Parse
("config list");
498
var setResult = command.
Parse
("config set testkey testvalue");
502
var listResult = command.
Parse
("config list");
524
var setResult = command.
Parse
("config set testkey testvalue");
528
var listResult = command.
Parse
("config list --all");
550
var listResult = command.
Parse
("config list");
572
var listResult = command.
Parse
("config list --all");
593
var listResult = command.
Parse
("config list --all");
617
var infoResult = command.
Parse
("config info --json");
662
var setResult = command.
Parse
($"config set {KnownFeatures.FeaturePrefix}.testFeature true");
680
var setResult = command.
Parse
($"config set {KnownFeatures.FeaturePrefix}.testFeature false");
704
var setResult = command.
Parse
($"config set {KnownFeatures.FeaturePrefix}.testFeature invalid");
737
var setResult = command.
Parse
($"config set {KnownFeatures.FeaturePrefix}.{KnownFeatures.ShowDeprecatedPackages} true");
770
var result = command.
Parse
("config set features:polyglotSupportEnabled true");
804
var setResult = command.
Parse
($"config set {key} true");
828
.
Parse
($"config get {key}");
832
.
Parse
($"config delete features:{featureName}");
847
var result1 = command.
Parse
("config set features:polyglotSupportEnabled true");
852
var result2 = command.
Parse
("config set features.polyglotSupportEnabled false");
878
var result1 = command.
Parse
("config set features.polyglotSupportEnabled true");
883
var result2 = command.
Parse
("config set features:polyglotSupportEnabled false");
909
var setResult = command.
Parse
("config set features.polyglotSupportEnabled true");
914
var deleteResult = command.
Parse
("config delete features:polyglotSupportEnabled");
1002
var result = command.
Parse
($"config set {key} AppHost.csproj");
1032
var result = command.
Parse
($"config set {key} AppHost.csproj");
1064
var result = command.
Parse
($"config set {key} AppHost.csproj --global");
1089
var result = command.
Parse
($"config set -g overrideStagingFeed {stagingFeed}");
1129
var result = command.
Parse
("config set appHostPath AppHost.csproj");
1147
var result = command.
Parse
("config set appHost.language typescript/nodejs");
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 (36)
29
var result = command.
Parse
("describe --help");
43
var result = command.
Parse
("describe");
62
var result = command.
Parse
($"describe --format {format} --help");
80
var result = command.
Parse
($"describe --format {format} --help");
95
var result = command.
Parse
("describe --format invalid");
110
var result = command.
Parse
("describe --follow --help");
125
var result = command.
Parse
("describe --watch --help");
140
var result = command.
Parse
("resources --help");
155
var result = command.
Parse
("describe --follow --format json --help");
170
var result = command.
Parse
("describe myresource --help");
185
var result = command.
Parse
("describe myresource --follow --format json --help");
294
var result = command.
Parse
("describe --follow --format json");
377
var result = command.
Parse
("describe --follow --format json");
416
var result = command.
Parse
("describe --follow --format json");
454
var result = command.
Parse
("describe --follow --format json");
502
var result = command.
Parse
("describe --follow --format json --include-disabled-commands");
547
var result = command.
Parse
("describe --follow --format json");
595
var result = command.
Parse
("describe --follow");
628
var result = command.
Parse
("describe --follow --format json");
658
var result = command.
Parse
("describe --follow --format json");
682
var result = command.
Parse
("describe --follow --format json");
709
var result = command.
Parse
("describe --format json");
748
var result = command.
Parse
("describe --format json");
779
var result = command.
Parse
("describe --follow --format json");
809
var result = command.
Parse
("describe --format json");
835
var result = command.
Parse
("describe --format json --include-hidden");
862
var result = command.
Parse
("describe aspire-dashboard --format json");
887
var result = command.
Parse
("describe --follow --format json");
915
var result = command.
Parse
("describe --follow --format json --include-hidden");
961
var result = provider.GetRequiredService<RootCommand>().
Parse
(args);
983
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
("resources --format mermaid").InvokeAsync().DefaultTimeout();
1006
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
($"resources {resource} --format mermaid").InvokeAsync().DefaultTimeout();
1024
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
($"resources {resource} --format mermaid").InvokeAsync().DefaultTimeout();
1038
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
("resources --format mermaid --follow").InvokeAsync().DefaultTimeout();
1055
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
("resources missing --format mermaid").InvokeAsync().DefaultTimeout();
1076
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
("resources --format mermaid").InvokeAsync().DefaultTimeout();
Commands\DestroyCommandTests.cs (7)
28
var result = command.
Parse
("destroy --help");
57
var result = command.
Parse
("destroy --apphost invalid.csproj");
116
var result = command.
Parse
("destroy");
152
var result = command.
Parse
(commandLine);
215
var result = command.
Parse
(commandLine);
273
var result = command.
Parse
($"destroy --output-path {testOutputPath}");
326
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");
395
var result = command.
Parse
(commandLine);
456
var exitCode = await command.
Parse
("do --list-steps --format json").InvokeAsync().DefaultTimeout();
502
var exitCode = await command.
Parse
("do --list-steps --format json").InvokeAsync().DefaultTimeout();
558
var result = command.
Parse
("do deploy --list-steps");
612
var result = command.
Parse
("do deploy --list-steps");
641
var exitCode = await command.
Parse
("do --list-steps --format json").InvokeAsync().DefaultTimeout();
670
var exitCode = await command.
Parse
("do --list-steps --format json").InvokeAsync().DefaultTimeout();
702
var exitCode = await command.
Parse
("do --list-steps --format json").InvokeAsync().DefaultTimeout();
732
var exitCode = await command.
Parse
("do --list-steps --format json").InvokeAsync().DefaultTimeout();
768
var exitCode = await command.
Parse
("do --list-steps --format json").InvokeAsync().DefaultTimeout();
824
var result = command.
Parse
("do deploy --list-steps");
839
var result = command.
Parse
("do --help");
877
var exitCode = await command.
Parse
("do deploy --format yaml").InvokeAsync().DefaultTimeout();
901
var exitCode = await command.
Parse
(commandLine).InvokeAsync().DefaultTimeout();
951
var result = command.
Parse
("do my-step --pipeline-log-level debug");
1006
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 (7)
29
var result = command.
Parse
("doctor --help");
148
var result = command.
Parse
("doctor --format json");
729
var result = command.
Parse
("doctor --self");
794
var result = command.
Parse
("doctor");
848
var result = command.
Parse
("doctor");
975
var result = command.
Parse
("doctor");
1023
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 (48)
101
var parseResult = initCommand.
Parse
("init");
146
var parseResult = initCommand.
Parse
($"init{additionalArgs}");
169
var parseResult = initCommand.
Parse
("init --file-based");
217
var parseResult = command.
Parse
("init --file-based --language csharp --non-interactive --suppress-agent-init");
242
var parseResult = command.
Parse
("init --help");
258
var parseResult = initCommand.
Parse
("init");
285
var parseResult = initCommand.
Parse
("init");
366
var parseResult = initCommand.
Parse
("init");
417
var parseResult = initCommand.
Parse
("init");
455
var parseResult = initCommand.
Parse
("init --source https://example.test/v3/index.json --version 13.0.0 --channel daily --suppress-agent-init");
513
var parseResult = command.
Parse
($"init --file-based{languageArgs}");
557
var parseResult = initCommand.
Parse
($"init{additionalArgs}");
589
var parseResult = initCommand.
Parse
($"init --language typescript{additionalArgs}");
639
var parseResult = initCommand.
Parse
($"init --language typescript{additionalArgs}");
686
var parseResult = initCommand.
Parse
("init --language typescript");
735
var parseResult = initCommand.
Parse
("init --language typescript");
752
var parseResult = command.
Parse
("init --non-interactive --skills none");
774
var parseResult = command.
Parse
("init --non-interactive --agents none");
796
var parseResult = command.
Parse
($"init --non-interactive --agents copilot --scope {scope} --skills {CommonAgentApplicators.AspireSkillName}");
824
var parseResult = initCommand.
Parse
("init");
857
var parseResult = initCommand.
Parse
("init");
907
var parseResult = initCommand.
Parse
($"init{additionalArgs}");
949
var parseResult = initCommand.
Parse
("init");
1037
var parseResult = initCommand.
Parse
("init");
1090
var parseResult = initCommand.
Parse
("init");
1145
var parseResult = initCommand.
Parse
("init");
1194
var parseResult = initCommand.
Parse
("init");
1230
var parseResult = initCommand.
Parse
("init");
1265
var parseResult = initCommand.
Parse
("init");
1301
var parseResult = initCommand.
Parse
("init");
1343
var parseResult = initCommand.
Parse
("init");
1374
var parseResult = initCommand.
Parse
("init");
1418
var parseResult = initCommand.
Parse
("init");
1470
var parseResult = initCommand.
Parse
("init");
1518
var parseResult = initCommand.
Parse
("init");
1572
var parseResult = initCommand.
Parse
("init");
1624
var parseResult = initCommand.
Parse
("init");
1694
var parseResult = initCommand.
Parse
("init");
1779
var parseResult = initCommand.
Parse
("init");
1847
var parseResult = initCommand.
Parse
("init");
1897
var parseResult = initCommand.
Parse
("init");
1943
var parseResult = initCommand.
Parse
("init");
1980
var parseResult = initCommand.
Parse
("init");
2029
var parseResult = initCommand.
Parse
("init");
2091
var parseResult = initCommand.
Parse
("init");
2142
var parseResult = initCommand.
Parse
("init");
2209
var parseResult = initCommand.
Parse
("init");
2256
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");
718
var result = command.
Parse
("ls");
747
var result = command.
Parse
("ls --all");
785
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)
111
var parseResult = newCommand.
Parse
("new aspire-starter --name TestApp --output ./output --use-redis-cache --test-framework None");
605
var parseResult = newCommand.
Parse
($"new fake-template --name TestApp --output ./captured{channelArg}{versionArg}{sourceArg}");
Commands\NewCommandTemplateConfigPersistenceTests.cs (2)
294
var parseResult = newCommand.
Parse
(string.Join(" ", commandArguments));
398
var parseResult = newCommand.
Parse
(
Commands\NewCommandTests.cs (77)
39
var result = command.
Parse
("new --help");
113
var configResult = configCommand.
Parse
($"config set -g overrideStagingFeed {stagingFeed}");
142
var result = command.
Parse
($"new {KnownTemplateId.CSharpEmptyAppHost} --language csharp --name TemplateOut --output ./TemplateOut --localhost-tld false");
170
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
194
var result = command.
Parse
($"new aspire-starter --use-redis-cache --test-framework {testFramework}");
250
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
283
var result = command.
Parse
("new aspire-starter --name MyApp --output ./output --use-redis-cache --test-framework None");
315
var result = command.
Parse
("new aspire-starter --output notsrc --use-redis-cache --test-framework None");
393
var result = command.
Parse
("new aspire-starter --channel stable --use-redis-cache --test-framework None");
470
var result = command.
Parse
("new aspire-starter --channel stable --use-redis-cache --test-framework None");
547
var result = command.
Parse
("new aspire-starter --channel pr-12345 --name TestApp --output ./output --use-redis-cache --test-framework None");
586
var result = command.
Parse
("new aspire-starter --name MyApp --output ./output --use-redis-cache --test-framework None");
618
var result = command.
Parse
("new aspire-starter --name MyApp --output ./output --use-redis-cache --test-framework None --version 9.2.0");
654
var result = command.
Parse
("new");
695
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
790
var result = command.
Parse
("new aspire-starter --name TestApp --output ./output");
853
var result = command.
Parse
($"new aspire-starter --use-redis-cache --test-framework None");
912
var result = command.
Parse
("new --name TestApp --output ./output");
982
var result = command.
Parse
("new --name TestApp --output ./output");
1017
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output");
1078
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output");
1141
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output");
1169
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init");
1239
var result = command.
Parse
($"new aspire-empty --name TestApp --output ./output --language csharp --localhost-tld false --suppress-agent-init --channel staging --source {sourceOverride}");
1284
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --language csharp --localhost-tld false --suppress-agent-init --channel staging --source relative-feed");
1333
var result = command.
Parse
($"new aspire-empty --name TestApp --output ./output --language {language} --localhost-tld false --suppress-agent-init --source \"{sourceOverride}\"");
1357
var result = command.
Parse
($"new aspire-empty --name TestApp --output ./output --language csharp --localhost-tld false --suppress-agent-init --source \"{sourceOverride}\"");
1392
var result = command.
Parse
($"new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init --source {sourceOverride}");
1426
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init --source nuget.org");
1460
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init");
1499
var result = command.
Parse
("new aspire-java-empty --name TestApp --output ./output --localhost-tld false");
1535
var result = command.
Parse
("new aspire-py-empty --name TestApp --output ./output --localhost-tld false");
1552
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --localhost-tld false");
1581
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --localhost-tld false --suppress-agent-init");
1615
var result = command.
Parse
($"new aspire-empty --name TestApp --output ./output --version {version} --localhost-tld false --suppress-agent-init");
1643
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --localhost-tld false --suppress-agent-init");
1677
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --localhost-tld --suppress-agent-init");
1751
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output");
1792
var result = command.
Parse
("new aspire-ts-empty --name TestApp --output ./output --localhost-tld false");
1840
var result = command.
Parse
("new aspire-ts-empty --name TestApp --output ./output --channel stable --localhost-tld false");
1881
var result = command.
Parse
("new aspire-ts-empty --name TestApp --localhost-tld false");
1959
var result = command.
Parse
("new aspire-ts-empty --name TestApp --output ./output");
2038
var result = command.
Parse
("new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false");
2103
var result = command.
Parse
("new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false");
2162
var result = command.
Parse
($"new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false --source \"{sourceOverride}\"");
2218
var result = command.
Parse
($"new aspire-starter --name TestApp --output ./output --source {sourceOverride} --use-redis-cache --test-framework None");
2274
var result = command.
Parse
($"new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false --source {sourceOverride}");
2302
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output");
2327
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --agents none");
2352
var result = command.
Parse
($"new aspire-empty --name TestApp --output ./output --agents copilot --skills {CommonAgentApplicators.AspireSkillName}");
2400
var result = command.
Parse
("new");
2446
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
2490
var result = command.
Parse
($"new aspire-starter --name MyProject --output {Path.Combine(workspace.WorkspaceRoot.FullName, "my-project")} --use-redis-cache --test-framework None");
2533
var result = command.
Parse
($"new aspire-starter --name MyProject --output {outputDir} --use-redis-cache --test-framework None --suppress-agent-init");
2580
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
2619
var result = command.
Parse
("new aspire-ts-empty --name TestApp --output ./output");
2674
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
2733
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
2790
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
2852
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
2914
var result = command.
Parse
($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false");
2977
var result = command.
Parse
($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false");
3055
var result = command.
Parse
(
3130
var result = command.
Parse
($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false --suppress-agent-init");
3199
var result = command.
Parse
($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false --suppress-agent-init");
3253
var result = command.
Parse
($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false");
3297
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --localhost-tld false");
3328
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --suppress-agent-init");
3355
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output --suppress-agent-init=false");
3384
var result = command.
Parse
("new aspire-empty --name TestApp --output ./output");
3409
var result = provider.GetRequiredService<NewCommand>().
Parse
(
3443
var result = command.
Parse
($"new aspire-starter --name TestApp --output {existingDir.FullName} --use-redis-cache --test-framework None");
3465
var result = command.
Parse
($"new aspire-starter --name TestApp --output {emptyDir.FullName} --use-redis-cache --test-framework None");
3500
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
3525
var result = command.
Parse
($"new aspire-starter --name TestApp --output {invalidPath} --use-redis-cache --test-framework None");
3571
var result = command.
Parse
("new aspire-starter --name TestApp --output . --use-redis-cache --test-framework None");
3630
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 (9)
31
var result = command.
Parse
("--version");
54
var result = command.
Parse
("-v");
79
var result = command.
Parse
("--version");
130
var result = command.
Parse
("--version");
188
var result = command.
Parse
("--help");
202
var result = command.
Parse
("--nologo --help");
221
var result = command.
Parse
("--help");
241
var result = command.
Parse
("run --capture-profile --capture-profile-output profile.zip --capture-profile-delay 1");
322
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}")
931
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
1032
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
1130
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
1210
var result = command.
Parse
("run");
1237
var result = command.
Parse
("run");
1267
var result = command.
Parse
("run");
1285
var result = command.
Parse
("run");
1302
var result = command.
Parse
("run --apphost /tmp/doesnotexist.csproj");
1366
var result = command.
Parse
($"run --apphost {appHostProjectFile.FullName}");
1396
var result = command.
Parse
("run");
1426
var result = command.
Parse
("run");
1455
var result = command.
Parse
($"run --apphost {appHostProjectFile.FullName}");
1515
var result = command.
Parse
($"run --apphost {appHostProjectFile.FullName}");
1538
var result = command.
Parse
("run --detach");
1568
var parentResult = parentCommand.
Parse
($"run --detach --apphost {appHostFile.FullName}");
1607
var childResult = childCommand.
Parse
("run");
1683
var result = command.
Parse
("run");
1789
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
1859
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
1927
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
1984
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
2043
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
2114
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
2224
var pendingCommand = command.
Parse
($"run --apphost {appHostFile.FullName}")
2307
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
2368
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
2420
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
2492
var result = command.
Parse
($"run --apphost {appHostFile.FullName}");
2649
var result = command.
Parse
("run");
2717
var result = command.
Parse
("run");
2848
var result = command.
Parse
("run");
2906
var result = command.
Parse
("run");
2954
var result = command.
Parse
("run --capture-profile");
2997
var result = command.
Parse
("run --capture-profile");
3048
var result = command.
Parse
("run --capture-profile");
3099
var result = command.
Parse
("run");
3210
var result = command.
Parse
("run");
3316
var result = command.
Parse
("run");
3386
var result = command.
Parse
("run");
3455
var result = command.
Parse
("run --start-debug-session");
3515
var result = command.
Parse
("run");
3579
var result = command.
Parse
("run");
3646
var result = command.
Parse
("run");
3705
var result = command.
Parse
("run");
3760
var result = command.
Parse
("run");
3817
var result = command.
Parse
("run");
3876
var result = command.
Parse
("run");
4283
var result = command.
Parse
("run --no-build");
4364
var result = command.
Parse
("run --isolated");
4425
var result = command.
Parse
("run --no-build");
4441
var result = command.
Parse
("run -- --custom-arg value --launch-profile E2E");
5070
var result = command.
Parse
(explicitAppHost ? $"run --apphost \"{appHostFile.FullName}\"" : "run");
5291
var result = command.
Parse
("run --non-interactive");
5364
var result = command.
Parse
("run --no-build");
5419
var result = command.
Parse
(args);
Commands\Sdk\SdkExportCommandTests.cs (1)
352
return await command.
Parse
(commandLine).InvokeAsync().DefaultTimeout();
Commands\SdkCommandTests.cs (2)
21
var result = command.
Parse
("sdk");
36
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");
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 (30)
37
var result = command.
Parse
($"secret path --apphost \"{appHostFile.FullName}\"");
63
var result = command.
Parse
($"secret path --apphost \"{appHostFile.FullName}\"");
90
var setResult = command.
Parse
($"secret set --environment Production Parameters:api_key prod-secret --apphost \"{appHostFile.FullName}\"");
98
var getResult = command.
Parse
($"secret get --environment Production Parameters:api_key --apphost \"{appHostFile.FullName}\"");
105
var listResult = command.
Parse
($"secret list --environment Production --format json --apphost \"{appHostFile.FullName}\"");
111
var defaultGetResult = command.
Parse
($"secret get Parameters:api_key --apphost \"{appHostFile.FullName}\"");
116
var deleteResult = command.
Parse
($"secret delete --environment Production Parameters:api_key --apphost \"{appHostFile.FullName}\"");
121
var deletedGetResult = command.
Parse
($"secret get --environment Production Parameters:api_key --apphost \"{appHostFile.FullName}\"");
142
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret set --environment Production Parameters:key prod-secret {projectOption}").InvokeAsync().DefaultTimeout());
146
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret set Parameters:key dev-secret {projectOption}").InvokeAsync().DefaultTimeout());
152
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret get --environment Production Parameters:key {projectOption}").InvokeAsync().DefaultTimeout());
156
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret list --all --format json {projectOption}").InvokeAsync().DefaultTimeout());
160
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret delete --environment Production Parameters:key {projectOption}").InvokeAsync().DefaultTimeout());
161
Assert.Equal(CliExitCodes.ConfigNotFound, await command.
Parse
($"secret get --environment Production Parameters:key {projectOption}").InvokeAsync().DefaultTimeout());
176
Assert.Equal(CliExitCodes.Success, await command.
Parse
(
180
Assert.Equal(CliExitCodes.Success, await command.
Parse
(
206
var setDevelopmentResult = command.
Parse
($"secret set Parameters:api_key dev-secret --apphost \"{appHostFile.FullName}\"");
213
var setProductionResult = command.
Parse
($"secret set --environment Production Azure:SubscriptionId prod-subscription --apphost \"{appHostFile.FullName}\"");
219
var listAllResult = command.
Parse
($"secret list --all --format json --apphost \"{appHostFile.FullName}\"");
259
var getLegacyResult = command.
Parse
($"secret get Legacy:Value --apphost \"{appHostFile.FullName}\"");
265
var setResult = command.
Parse
($"secret set New:Value new --apphost \"{appHostFile.FullName}\"");
303
var result = command.
Parse
($"secret {arguments} --environment \"{environment}\"");
325
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret set Parameters:key initial -e {originalEnvironment} {projectOption}").InvokeAsync().DefaultTimeout());
326
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret set Parameters:key updated -e {alternateEnvironment} {projectOption}").InvokeAsync().DefaultTimeout());
329
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret get Parameters:key -e {alternateEnvironment} {projectOption}").InvokeAsync().DefaultTimeout());
333
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret list --all --format json {projectOption}").InvokeAsync().DefaultTimeout());
339
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret path -e {alternateEnvironment} {projectOption}").InvokeAsync().DefaultTimeout());
342
Assert.Equal(CliExitCodes.Success, await command.
Parse
($"secret delete Parameters:key -e {alternateEnvironment} {projectOption}").InvokeAsync().DefaultTimeout());
343
Assert.Equal(CliExitCodes.ConfigNotFound, await command.
Parse
($"secret get Parameters:key -e {originalEnvironment} {projectOption}").InvokeAsync().DefaultTimeout());
373
var exitCode = await command.
Parse
($"secret {arguments} -e Production --apphost \"{appHostFile.FullName}\"")
Commands\StartCommandTests.cs (28)
34
var result = command.
Parse
("start --help");
54
var result = command.
Parse
("start --help");
71
var result = command.
Parse
("start --no-build --help");
85
var result = command.
Parse
("start --format json --help");
99
var result = command.
Parse
("start --isolated --help");
182
var result = command.
Parse
("start");
200
var result = command.
Parse
("start -- --custom-arg value --launch-profile E2E");
286
var result = command.
Parse
("start");
316
var result = command.
Parse
("start --format json");
361
var result = command.
Parse
($"start --apphost {appHostFile.FullName}");
477
var result = command.
Parse
("start");
506
var result = command.
Parse
($"start --apphost {appHostFile.FullName} --start-debug-session");
531
var result = provider.GetRequiredService<RootCommand>().
Parse
($"start --apphost {appHostFile.FullName}");
569
var result = command.
Parse
($"start --apphost {appHostFile.FullName}");
605
var result = command.
Parse
(string.Format(CultureInfo.InvariantCulture, commandTemplate, appHostFile.FullName));
625
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("start")));
626
Assert.True(AppHostLauncher.ResolveIsolated(command.
Parse
("start --isolated")));
627
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("start --isolated false")));
628
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("run")));
629
Assert.True(AppHostLauncher.ResolveIsolated(command.
Parse
("run --isolated")));
630
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("run --isolated false")));
644
Assert.Equal(expected, AppHostLauncher.GetExplicitIsolated(command.
Parse
(commandLine)));
657
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("start")));
658
Assert.True(AppHostLauncher.ResolveIsolated(command.
Parse
("start --isolated")));
659
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("start --isolated false")));
660
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("run")));
661
Assert.True(AppHostLauncher.ResolveIsolated(command.
Parse
("run --isolated")));
662
Assert.False(AppHostLauncher.ResolveIsolated(command.
Parse
("run --isolated false")));
Commands\StopCommandTests.cs (39)
37
var result = command.
Parse
("stop --help");
52
var result = command.
Parse
("stop myresource");
197
var exitCode = await command.
Parse
(commandLine).InvokeAsync().DefaultTimeout();
216
var result = provider.GetRequiredService<RootCommand>().
Parse
(commandLine);
244
var result = provider.GetRequiredService<RootCommand>().
Parse
($"stop --pid {int.MaxValue - 1}");
284
.
Parse
($"stop --pid {int.MaxValue - 1}").InvokeAsync().DefaultTimeout();
314
var exitCode = await provider.GetRequiredService<RootCommand>().
Parse
(commandLine).InvokeAsync().DefaultTimeout();
338
var result = command.
Parse
("stop --apphost missing-directory");
369
var result = command.
Parse
($"stop --apphost \"{appHostDirectory.FullName}\"");
403
var result = command.
Parse
("stop --all");
439
var result = command.
Parse
("stop --all");
475
var result = command.
Parse
("stop");
528
var result = command.
Parse
("stop");
562
var result = command.
Parse
($"stop --apphost \"{appHostFile.FullName}\"");
603
var result = command.
Parse
("stop");
642
var result = command.
Parse
("stop");
683
var result = command.
Parse
("stop --all");
724
var result = command.
Parse
(commandLine);
760
var result = command.
Parse
($"stop --force{volumesOption} --apphost \"{appHostFile.FullName}\"");
794
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
840
var result = command.
Parse
("stop --force");
878
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
912
var result = command.
Parse
("stop --force");
951
var result = command.
Parse
("stop --force");
988
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1031
var result = command.
Parse
($"stop --force{volumesOption} --apphost \"{appHostFile.FullName}\"");
1071
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1110
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1154
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1196
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1238
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1276
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1314
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1348
var result = command.
Parse
($"stop --force --apphost \"{appHostFile.FullName}\"");
1385
var result = command.
Parse
("stop --force");
1423
var result = command.
Parse
("stop --force");
1443
var result = command.
Parse
("stop --force --all");
1465
var result = command.
Parse
("stop --volumes");
1504
var result = command.
Parse
("stop");
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 (11)
29
var result = command.
Parse
("otel spans");
47
var result = command.
Parse
($"telemetry spans --limit {limitValue}");
73
var result = command.
Parse
("otel spans");
108
var result = command.
Parse
("otel spans");
192
var result = command.
Parse
("otel spans --dashboard-url http://localhost:18888");
216
var result = command.
Parse
("otel spans --dashboard-url http://localhost:18888 --apphost TestAppHost.csproj");
254
var result = command.
Parse
("otel spans --dashboard-url http://localhost:18888");
294
var result = command.
Parse
("otel spans --dashboard-url http://localhost:18888");
378
var result = command.
Parse
("otel spans --format json --dashboard-url http://localhost:18888");
449
var result = command.
Parse
("otel spans --dashboard-url http://localhost:18888 --search \"GET /index\"");
496
var result = command.
Parse
("otel spans --dashboard-url http://localhost:18888 --search \"duration:>=50.5\"");
Commands\TelemetryTracesCommandTests.cs (13)
31
var result = command.
Parse
("otel traces");
129
var result = command.
Parse
("otel traces --format json -n 5");
215
var result = command.
Parse
("otel traces --format json -n 5 --dashboard-url http://dashboard.dev.localhost:18888");
244
var result = command.
Parse
($"telemetry traces --limit {limitValue}");
270
var result = command.
Parse
("otel traces");
321
var result = command.
Parse
("otel traces");
437
var result = command.
Parse
("otel traces --dashboard-url http://localhost:18888");
461
var result = command.
Parse
("otel traces --dashboard-url http://localhost:18888 --apphost TestAppHost.csproj");
499
var result = command.
Parse
("otel traces --dashboard-url http://localhost:18888");
582
var result = command.
Parse
("otel traces --format json --dashboard-url http://localhost:18888");
666
var result = command.
Parse
("otel traces --trace-id abc1234567890def --format json --dashboard-url http://localhost:18888");
715
var result = command.
Parse
("otel traces --dashboard-url http://localhost:18888 --search frontend");
762
var result = command.
Parse
("otel traces --dashboard-url http://localhost:18888 --search \"duration:>=50.5\"");
Commands\TerminalCommandTests.cs (20)
25
var result = command.
Parse
("terminal --help");
41
var result = command.
Parse
("terminal");
55
var result = command.
Parse
("terminal attach");
69
var result = command.
Parse
("terminal attach myresource");
89
var result = command.
Parse
("terminal attach myresource");
109
var result = command.
Parse
("terminal attach does-not-exist");
134
var result = command.
Parse
("terminal attach myresource");
159
var result = command.
Parse
("terminal attach myresource");
200
var result = command.
Parse
("terminal attach myresource --replica 99");
239
var result = command.
Parse
("terminal attach myresource");
285
var result = command.
Parse
("terminal attach myresource");
302
var result = command.
Parse
("terminal ps");
325
var result = command.
Parse
("terminal ps");
349
var result = command.
Parse
("terminal ps");
396
var result = command.
Parse
("terminal ps");
431
var result = command.
Parse
("terminal ps --format json");
554
var result = command.
Parse
("terminal ps --format json --verbose");
665
var result = command.
Parse
("terminal ps --format json");
737
var result = command.
Parse
("terminal ps --format json");
777
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 (13)
29
var result = provider.GetRequiredService<RootCommand>().
Parse
(arguments);
41
var result = provider.GetRequiredService<RootCommand>().
Parse
("terminal tape play shell --tape-file probe.tape");
101
var result = provider.GetRequiredService<RootCommand>().
Parse
("terminal tape play shell --tape-file probe.tape");
187
var result = provider.GetRequiredService<RootCommand>().
Parse
(
233
var result = provider.GetRequiredService<RootCommand>().
Parse
(
287
var result = provider.GetRequiredService<RootCommand>().
Parse
(
394
var invalid = command.
Parse
("terminal tape play shell --tape-file play.tape");
401
var valid = command.
Parse
("terminal tape play shell --tape-file play.tape");
417
var result = provider.GetRequiredService<RootCommand>().
Parse
("terminal tape play shell --tape-file wait.tape");
435
var result = provider.GetRequiredService<RootCommand>().
Parse
("terminal tape play shell --tape-file wait.tape --timeout 5");
454
var result = provider.GetRequiredService<RootCommand>().
Parse
("terminal tape play shell --tape-file wait.tape");
473
var result = provider.GetRequiredService<RootCommand>().
Parse
("terminal tape play shell --tape-file wait.tape");
491
var result = provider.GetRequiredService<RootCommand>().
Parse
("terminal tape play shell --tape-file probe.tape");
Commands\TrayCommandTests.cs (19)
51
.
Parse
("tray start --non-interactive --nologo").InvokeAsync().DefaultTimeout());
74
.
Parse
("tray start --non-interactive --nologo").InvokeAsync().DefaultTimeout());
88
.
Parse
("tray start --non-interactive --nologo").InvokeAsync().DefaultTimeout());
104
.
Parse
("tray start --non-interactive --nologo").InvokeAsync().DefaultTimeout());
149
.
Parse
($"tray {action} --non-interactive --nologo").InvokeAsync();
190
Assert.Equal(CliExitCodes.Success, await command.
Parse
("tray start --non-interactive --nologo").InvokeAsync().DefaultTimeout());
228
.
Parse
($"tray {action}").InvokeAsync().DefaultTimeout());
262
.
Parse
("tray start").InvokeAsync().DefaultTimeout());
302
.
Parse
($"tray {action}").InvokeAsync().DefaultTimeout());
334
.
Parse
($"tray {action}").InvokeAsync().DefaultTimeout());
364
.
Parse
($"tray {action}").InvokeAsync().DefaultTimeout());
402
.
Parse
($"tray {action}").InvokeAsync(cancellationToken: cancellation.Token);
455
.
Parse
("tray start").InvokeAsync(cancellationToken: cancellation.Token);
493
.
Parse
($"tray {action}").InvokeAsync(cancellationToken: cancellation.Token).DefaultTimeout();
508
var result = provider.GetRequiredService<RootCommand>().
Parse
(arguments);
529
Assert.Equal(CliExitCodes.Success, await command.
Parse
("tray --help").InvokeAsync().DefaultTimeout());
592
.
Parse
($"tray {action}").InvokeAsync().DefaultTimeout());
613
.
Parse
(start ? "tray start" : "tray stop").InvokeAsync().DefaultTimeout());
657
.
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 (7)
63
.
Parse
("update --channel stable --yes --non-interactive").InvokeAsync().DefaultTimeout();
160
.
Parse
("update --channel stable --yes --non-interactive").InvokeAsync().DefaultTimeout();
211
.
Parse
("update --channel stable --yes --non-interactive").InvokeAsync().DefaultTimeout();
276
.
Parse
("update --channel stable").InvokeAsync().DefaultTimeout();
340
.
Parse
("update --self --yes --non-interactive").InvokeAsync().DefaultTimeout();
379
.
Parse
("update --channel stable --yes --non-interactive").InvokeAsync().DefaultTimeout();
535
.
Parse
("update --channel daily").InvokeAsync().DefaultTimeout();
Commands\UpdateCommandTests.cs (52)
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");
1230
var result = command.
Parse
("update --self");
1262
var result = command.
Parse
("update --self");
1297
var result = command.
Parse
("update --self");
1421
var result = command.
Parse
(commandLine);
1452
var result = command.
Parse
("update --self");
1490
var result = command.
Parse
("update");
1534
var result = command.
Parse
("update --self --channel daily");
1570
var result = command.
Parse
("update --self --channel staging");
1614
var result = command.
Parse
("update --self --channel staging");
1659
var result = command.
Parse
("update --self --quality daily");
1700
var result = command.
Parse
("update --self --channel daily");
1763
var result = command.
Parse
("update --channel daily");
1828
var result = command.
Parse
("update --quality daily");
1882
var result = command.
Parse
("update --quality invalid");
1949
var result = command.
Parse
("update --channel stable --quality daily");
2013
var result = command.
Parse
("update");
2075
var result = command.
Parse
("update");
2233
var result = command.
Parse
("update");
2293
var result = command.
Parse
("update --channel staging");
2527
var result = command.
Parse
("update");
2601
var result = command.
Parse
("update");
2686
var result = command.
Parse
("update");
2739
var result = command.
Parse
($"update --apphost \"{appHostFile.FullName}\"");
3077
var result = command.
Parse
(updateArgs);
3115
var result = command.
Parse
("update --self");
3156
var result = command.
Parse
("update --self");
3201
var result = command.
Parse
("update --self");
3246
var result = command.
Parse
("update --self");
3280
var result = command.
Parse
("update --self --channel stable");
3346
var result = command.
Parse
("update --yes --channel stable --non-interactive");
3466
var result = command.
Parse
(updateArgs);
3632
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");
Interaction\ConsoleInteractionServiceTests.cs (23)
1372
var parseResult = command.
Parse
("--value bad-value");
1435
var parseResult = command.
Parse
("");
1465
var parseResult = command.
Parse
("");
1482
var parseResult = command.
Parse
("");
1564
var parseResult = command.
Parse
("");
1576
var parseResult = command.
Parse
("");
1592
var parseResult = command.
Parse
("");
1622
var parseResult = command.
Parse
("--choice invalid");
1644
var parseResult = command.
Parse
("--items invalid");
1671
var parseResult = command.
Parse
("--items invalid");
1697
var parseResult = command.
Parse
("--items invalid");
1729
var parseResult = command.
Parse
("--items invalid");
1755
var parseResult = command.
Parse
("");
1773
var parseResult = command.
Parse
("--choice option1");
1791
var parseResult = command.
Parse
("--items alpha,gamma");
1806
var parseResult = command.
Parse
("--yes");
1818
var parseResult = command.
Parse
("--include");
1880
var parseResult = command.
Parse
("");
1897
var parseResult = command.
Parse
("--choice option1");
1916
var parseResult = command.
Parse
("--items alpha,gamma");
1935
var parseResult = command.
Parse
("");
1954
var parseResult = command.
Parse
("");
1971
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"));
293
var parseResult = newCommand.
Parse
(commandLine);
514
command.SelectForExecution(parseResult ?? command.
Parse
(commandLine));
Templating\JavaStarterScaffoldTests.cs (1)
147
var parseResult = newCommand.
Parse
(
dotnet-aot (1)
parent\dotnet\Parser.cs (1)
364
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);