1113 references to Parse
aspire (1)
Completions\CompletionInvocation.cs (1)
94return WriteCompletions(command.Parse(args[1]).GetCompletions(position), output);
Aspire.Cli.Tests (1107)
CliBootstrapTests.cs (2)
452var parseResult = command.Parse(commandLine); 473var parseResult = command.Parse("ls");
Commands\AddCommandTests.cs (67)
34var result = command.Parse("add --help"); 48var result = command.Parse("integration add --help"); 77var result = command.Parse("integration search redis --json"); 108var result = command.Parse("integration search --format json"); 186var result = command.Parse("integration list --format json"); 234var result = command.Parse(commandLine); 259var result = command.Parse("integration list"); 309var result = command.Parse("integration search redis --format json"); 355var result = command.Parse("integration search rdis --format json"); 442var result = command.Parse($"integration search redis --apphost \"{appHostFile.FullName}\" --format json"); 514var result = command.Parse($"integration search redis --apphost \"{appHostFile.FullName}\" --format json"); 601var result = command.Parse($"integration search foundry --apphost \"{appHostFile.FullName}\" --format json"); 696var result = command.Parse($"integration search redis --apphost \"{appHostFile.FullName}\" --format json"); 778var result = command.Parse($"{commandText} --apphost \"{appHostFile.FullName}\" --format json"); 827var result = command.Parse($"integration search redis --apphost \"{appHostFile.FullName}\" --format json"); 910var result = command.Parse($"integration search foundry --apphost \"{appHostFile.FullName}\" --format json"); 968var result = command.Parse("integration list --format json"); 1021var result = command.Parse("integration search azure --format json"); 1105var result = command.Parse("add"); 1183var result = command.Parse("add docker"); 1266var result = command.Parse("add docker --version 9.2.0"); 1346var result = command.Parse("add docker --version 9.2.0"); 1421var result = command.Parse("add redis --version 13.2.0"); 1490var result = command.Parse("add redis --version 13.2.0"); 1581var result = command.Parse("add redis --version 13.2.0"); 1652var result = command.Parse($"add {integrationName}"); 1726var result = command.Parse("add redis --version 13.2.0"); 1801var result = command.Parse("add --version 13.2.0"); 1872var result = command.Parse("add --version 13.2.0"); 1942var result = command.Parse("add redis --version 13.2.0"); 2019var result = command.Parse("add redis --version 13.2.0"); 2103var result = command.Parse("add red"); 2186var result = command.Parse($"add redis --source {expectedSource}"); 2210var result = command.Parse($"add redis --source {source}"); 2244var result = command.Parse("add"); 2319var result = command.Parse("add nonexistentpackage"); 2727var result = command.Parse($"add {packageId} --apphost \"{appHostFile.FullName}\""); 2799var result = command.Parse($"add Aspire.Hosting.Azure.Storage --apphost \"{appHostFile.FullName}\""); 2857var result = command.Parse("add redis"); 2925var result = command.Parse("add redis"); 3172var result = command.Parse("add redis"); 3241var result = command.Parse("add redis"); 3291var result = command.Parse($"add Aspire.Hosting.Foo --apphost \"{appHostFile.FullName}\""); 3351var result = command.Parse($"add {integrationName} --apphost \"{appHostFile.FullName}\"{sourceArgument}"); 3401var result = command.Parse($"add redis --apphost \"{appHostFile.FullName}\" --source ./feed"); 3462var result = command.Parse($"add Aspire.Hosting.Redis --apphost \"{appHostFile.FullName}\""); 3514var result = command.Parse($"add Aspire.Hosting.Foo --all --apphost \"{appHostFile.FullName}\""); 3560var result = command.Parse($"integration list --apphost \"{appHostFile.FullName}\" --format json"); 3608var result = command.Parse($"integration list --apphost \"{appHostFile.FullName}\""); 3655var result = command.Parse($"integration list --apphost \"{appHostFile.FullName}\""); 3704var result = command.Parse($"integration search zzznomatch --apphost \"{appHostFile.FullName}\""); 3762var result = command.Parse($"add Aspire.Hosting.Foo --apphost \"{appHostFile.FullName}\""); 3816var result = command.Parse($"add Aspire.Hosting.Redis --apphost \"{appHostFile.FullName}\""); 3862var result = command.Parse($"integration list --apphost \"{appHostFile.FullName}\" --format json"); 4028var result = command.Parse("add postgre"); 4095var result = command.Parse("add kube"); 4148var result = command.Parse("add kubernetes"); 4205var result = command.Parse("add kube"); 4270var result = command.Parse("add zzzzzzzzzz"); 4324var result = command.Parse("add postgre --version 9.2.0"); 4376var result = command.Parse("add nonexistentpackage --version 9.2.0"); 4462var result = command.Parse("add sql"); 4543var result = command.Parse("add sql --version 13.2.0"); 4626var result = command.Parse("add sql --version 13.2.0"); 4714var result = command.Parse("add nonexistentpackage --version 13.2.0"); 4801var result = command.Parse("add nonexistentpackage --version 13.2.0"); 4878var result = command.Parse("add azureapp");
Commands\AgentInitClientSelectionTests.cs (37)
37var result = provider.GetRequiredService<RootCommand>().Parse( 91var result = provider.GetRequiredService<RootCommand>().Parse( 116var result = provider.GetRequiredService<RootCommand>().Parse("agent init --skills aspire --mcp=false"); 165var result = provider.GetRequiredService<RootCommand>().Parse( 217var result = provider.GetRequiredService<RootCommand>().Parse( 243var result = provider.GetRequiredService<RootCommand>().Parse( 271var result = command.Parse($"agent init {options}"); 285var result = provider.GetRequiredService<RootCommand>().Parse($"agent init --scope {value}"); 301var result = provider.GetRequiredService<RootCommand>().Parse($"{command} --agent copilot"); 334var result = provider.GetRequiredService<RootCommand>().Parse("agent init --skills all --mcp"); 383var result = provider.GetRequiredService<RootCommand>().Parse( 425var result = provider.GetRequiredService<RootCommand>().Parse("agent init"); 457var result = provider.GetRequiredService<RootCommand>().Parse("agent init --skills none"); 479var result = provider.GetRequiredService<RootCommand>().Parse("agent init --agents COPILOT,copilot,OpenCode --skills aspire"); 502var result = provider.GetRequiredService<RootCommand>().Parse($"agent init --agents all --scope {scope} --skills none --mcp"); 528var result = provider.GetRequiredService<RootCommand>().Parse("agent init --agents copilot,claude --skills none --mcp"); 547var result = provider.GetRequiredService<RootCommand>().Parse($"agent init --agents {client} --scope {scope} --skills none --mcp"); 576var result = provider.GetRequiredService<RootCommand>().Parse( 597var result = command.Parse($"agent init --agents {client} --skills none --mcp"); 625var result = provider.GetRequiredService<RootCommand>().Parse( 669var result = provider.GetRequiredService<RootCommand>().Parse( 730var result = provider.GetRequiredService<RootCommand>().Parse( 765var result = provider.GetRequiredService<RootCommand>().Parse( 806var result = provider.GetRequiredService<RootCommand>().Parse( 859var result = provider.GetRequiredService<RootCommand>().Parse( 897var result = provider.GetRequiredService<RootCommand>().Parse( 924var result = provider.GetRequiredService<RootCommand>().Parse("agent init --agents opencode --scope global --skills none --mcp"); 960var result = provider.GetRequiredService<RootCommand>().Parse("agent init --agents all --scope global --skills none --mcp"); 994var result = provider.GetRequiredService<RootCommand>().Parse( 1024var result = provider.GetRequiredService<RootCommand>().Parse( 1056var result = provider.GetRequiredService<RootCommand>().Parse( 1109var result = provider.GetRequiredService<RootCommand>().Parse( 1140var result = provider.GetRequiredService<RootCommand>().Parse( 1179var result = provider.GetRequiredService<RootCommand>().Parse( 1213var result = provider.GetRequiredService<RootCommand>().Parse( 1237var result = provider.GetRequiredService<RootCommand>().Parse($"agent init --agents claude --scope {scope} --skills aspire"); 1248var result = provider.GetRequiredService<RootCommand>().Parse("mcp init --agents claude --scope project --skills aspire --mcp");
Commands\AgentInitCommandTests.cs (28)
44var result = command.Parse("agent init --agents copilot --scope global"); 77var result = command.Parse("agent init --agents copilot"); 121var result = command.Parse("agent init"); 143var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --skills all"); 201var result = command.Parse("agent init"); 248var result = command.Parse("agent init"); 312var result = command.Parse("agent init"); 359var result = command.Parse("agent init"); 378var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --skills {FakeAspireSkillsInstaller.AspireMonitoringSkillName}"); 421var result = command.Parse($"agent init --workspace-root \"{workspace.WorkspaceRoot.FullName}\" --agents all --scope project{selection}"); 464var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --skills PLAYWRIGHT-CLI"); 507var result = command.Parse("agent init"); 525var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents none --skills all"); 545var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skills none"); 561var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all"); 607var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --skills {skillsArg}"); 630var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --skills {FakeAspireSkillsInstaller.AspireOrchestrationSkillName}"); 650var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents invalid --skills all"); 667var result = command.Parse("agent init --agents copilot"); 699var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all"); 791var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --skills none"); 810var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all"); 827var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --mcp"); 844var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents all --mcp=false"); 862var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents none --skills all"); 882var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents copilot --skills {CommonAgentApplicators.AspireSkillName}"); 979var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents copilot --scope global --skills aspire"); 1013var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --agents copilot --scope global --skills aspire");
Commands\AgentMcpCommandTests.cs (8)
95var parseResult = rootCommand.Parse(commandLine); 1596var parseResult = rootCommand.Parse("agent mcp --dashboard-url not-a-url"); 1616var parseResult = rootCommand.Parse( 1673var parseResult = rootCommand.Parse(commandLine); 1707var parseResult = rootCommand.Parse($"agent mcp --apphost \"{appHostProjectFile.FullName}\""); 1740var parseResult = rootCommand.Parse($"agent mcp --apphost \"{appHostDirectory.FullName}\""); 1768var parseResult = rootCommand.Parse($"agent mcp --apphost \"{missingPath}\""); 1803var parseResult = rootCommand.Parse($"agent mcp --apphost \"{appHostDirectory.FullName}\"");
Commands\AgentTelemetryCommandTests.cs (7)
168var 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"); 200var result = command.Parse("agent telemetry --event-type tool_invocation --tool-name aspire-list_resources"); 231var result = command.Parse($"agent telemetry --event-type reference_file_read --file-reference {longValue}"); 289var result = command.Parse("agent telemetry --event-type not_a_real_event --skill-name aspire"); 336var result = command.Parse("agent telemetry --event-type skill_invocation --some-future-flag value"); 351var result = command.Parse("agent telemetry"); 383var result = command.Parse("agent telemetry --event-type reference_file_read --file-reference aspire/references/deploy.md");
Commands\ApiCommandTests.cs (5)
24var result = command.Parse("docs api"); 41var result = command.Parse("docs api list csharp"); 58var result = command.Parse("docs api search emulator --language typescript --format json"); 75var result = command.Parse("docs api get csharp/aspire.test.package/testtype"); 92var result = command.Parse("docs api get missing/id");
Commands\BaseCommandTests.cs (25)
46var result = command.Parse(args); 72var result = command.Parse("integration list --format json"); 93var result = command.Parse("stop"); 119var result = command.Parse("stop"); 143var result = command.Parse("stop"); 164var result = command.Parse("test"); 221var result = command.Parse(args); 247var result = command.Parse("run"); 284var result = command.Parse("run"); 335var result = provider.GetRequiredService<RootCommand>().Parse("ps"); 368var result = provider.GetRequiredService<RootCommand>().Parse("ps"); 398var result = command.Parse("add SomePackage"); 433var result = command.Parse("run"); 456var result = command.Parse("ps"); 485var result = command.Parse("ps"); 538var result = command.Parse("run"); 577var result = command.Parse("run"); 613var result = command.Parse(args); 641var result = command.Parse("run --apphost somepath"); 669var result = command.Parse($"run {optionName}={value}"); 715var result = command.Parse("run --custom-arg value"); 741var result = command.Parse("run -- --AppHost somepath"); 762var result = command.Parse("run --AppHost foo -- --AppHost bar"); 781var result = command.Parse("add --AppHost somepath"); 802var result = command.Parse("resource myresource mycommand --AppHost primary");
Commands\CacheCommandTests.cs (7)
22var result = command.Parse("cache"); 37var result = command.Parse("cache --help"); 58var result = command.Parse("cache clear"); 79var result = command.Parse("cache clear"); 109var result = command.Parse("cache clear"); 136var result = command.Parse("cache clear"); 156var result = command.Parse("cache clear");
Commands\CertificatesCommandTests.cs (4)
27var result = command.Parse("certs --help"); 42var result = command.Parse("certs clean --help"); 57var result = command.Parse("certs trust --help"); 111var result = command.Parse("certs trust --non-interactive");
Commands\ConfigCommandTests.cs (53)
95var result = command.Parse("config"); 109var result = command.Parse("config"); 123var result = command.Parse("config set foo bar"); 147var setLlmsResult = command.Parse("config set docs.llmsTxtUrl http://localhost:4321/llms-small.txt"); 151var setSitemapResult = command.Parse("config set docs.api.sitemapUrl http://localhost:4321/sitemap-0.xml"); 183var result = command.Parse("config set certificates.nssDbPaths firefox=/profiles/firefox --global"); 226var result = command.Parse($"config set {AspireConfigContainerTunnel.BaseImageConfigKey} {image}"); 262var result = command.Parse("config set foo.bar baz"); 287var result = command.Parse("config set foo.bar.baz hello"); 317var result1 = command.Parse("config set foo primitive"); 322var result2 = command.Parse("config set foo.bar nested"); 347var setResult = command1.Parse("config set testkey testvalue"); 358var getResult = command2.Parse("config get testkey"); 373var setResult = command1.Parse("config set level1.level2.level3 nestedvalue"); 383var getResult = command2.Parse("config get level1.level2.level3"); 396var result = command.Parse("config get nonexistent.key"); 412var setResult = command.Parse("config set deletekey deletevalue"); 417var deleteResult = command.Parse("config delete deletekey"); 422var getResult = command.Parse("config get deletekey"); 437var setResult = command.Parse("config set deep.nested.value test"); 442var deleteResult = command.Parse("config delete deep.nested.value"); 466var setResult1 = command.Parse("config set flatkey flatvalue"); 470var setResult2 = command.Parse("config set nested.key nestedvalue"); 474var setResult3 = command.Parse("config set deep.nested.key deepvalue"); 479var listResult = command.Parse("config list"); 498var setResult = command.Parse("config set testkey testvalue"); 502var listResult = command.Parse("config list"); 524var setResult = command.Parse("config set testkey testvalue"); 528var listResult = command.Parse("config list --all"); 550var listResult = command.Parse("config list"); 572var listResult = command.Parse("config list --all"); 593var listResult = command.Parse("config list --all"); 617var infoResult = command.Parse("config info --json"); 662var setResult = command.Parse($"config set {KnownFeatures.FeaturePrefix}.testFeature true"); 680var setResult = command.Parse($"config set {KnownFeatures.FeaturePrefix}.testFeature false"); 704var setResult = command.Parse($"config set {KnownFeatures.FeaturePrefix}.testFeature invalid"); 737var setResult = command.Parse($"config set {KnownFeatures.FeaturePrefix}.{KnownFeatures.ShowDeprecatedPackages} true"); 770var result = command.Parse("config set features:polyglotSupportEnabled true"); 804var setResult = command.Parse($"config set {key} true"); 828.Parse($"config get {key}"); 832.Parse($"config delete features:{featureName}"); 847var result1 = command.Parse("config set features:polyglotSupportEnabled true"); 852var result2 = command.Parse("config set features.polyglotSupportEnabled false"); 878var result1 = command.Parse("config set features.polyglotSupportEnabled true"); 883var result2 = command.Parse("config set features:polyglotSupportEnabled false"); 909var setResult = command.Parse("config set features.polyglotSupportEnabled true"); 914var deleteResult = command.Parse("config delete features:polyglotSupportEnabled"); 1002var result = command.Parse($"config set {key} AppHost.csproj"); 1032var result = command.Parse($"config set {key} AppHost.csproj"); 1064var result = command.Parse($"config set {key} AppHost.csproj --global"); 1089var result = command.Parse($"config set -g overrideStagingFeed {stagingFeed}"); 1129var result = command.Parse("config set appHostPath AppHost.csproj"); 1147var result = command.Parse("config set appHost.language typescript/nodejs");
Commands\DashboardRunCommandTests.cs (18)
39var result = command.Parse("dashboard run"); 56var result = command.Parse("dashboard run --help"); 79var result = command.Parse($"dashboard run {args}"); 92var result = command.Parse("dashboard run --ASPNETCORE_URLS=http://localhost:9999"); 144var result = command.Parse("dashboard run"); 164var result = command.Parse("dashboard run"); 203var result = command.Parse("dashboard run"); 222var result = command.Parse("dashboard run"); 255var result = command.Parse("dashboard run"); 279var result = command.Parse("dashboard run"); 311var result = command.Parse($"dashboard run {cliArgs}"); 331var result = command.Parse("dashboard run"); 355var result = command.Parse("dashboard run"); 376var result = command.Parse("dashboard run --CUSTOM_SETTING=myvalue"); 401var 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"); 429var result = command.Parse("dashboard run"); 460var result = command.Parse("dashboard run"); 517var result = command.Parse("dashboard run");
Commands\DeployCommandTests.cs (12)
30var result = command.Parse("deploy --help"); 60var result = command.Parse("deploy"); 126var result = command.Parse(invocation); 178var result = command.Parse("deploy --apphost invalid.csproj"); 212var result = command.Parse("deploy --apphost valid.csproj"); 246var result = command.Parse("deploy --apphost valid.csproj"); 314var result = command.Parse("deploy"); 386var result = command.Parse("deploy"); 444var result = command.Parse($"deploy --apphost \"{appHostFile.FullName}\" --environment \"{environment}\""); 492var result = command.Parse($"deploy --apphost \"{appHostFile.FullName}\" --environment Production"); 563var result = command.Parse($"deploy --output-path {testOutputPath}"); 623var result = command.Parse("deploy");
Commands\DescribeCommandTests.cs (36)
29var result = command.Parse("describe --help"); 43var result = command.Parse("describe"); 62var result = command.Parse($"describe --format {format} --help"); 80var result = command.Parse($"describe --format {format} --help"); 95var result = command.Parse("describe --format invalid"); 110var result = command.Parse("describe --follow --help"); 125var result = command.Parse("describe --watch --help"); 140var result = command.Parse("resources --help"); 155var result = command.Parse("describe --follow --format json --help"); 170var result = command.Parse("describe myresource --help"); 185var result = command.Parse("describe myresource --follow --format json --help"); 294var result = command.Parse("describe --follow --format json"); 377var result = command.Parse("describe --follow --format json"); 416var result = command.Parse("describe --follow --format json"); 454var result = command.Parse("describe --follow --format json"); 502var result = command.Parse("describe --follow --format json --include-disabled-commands"); 547var result = command.Parse("describe --follow --format json"); 595var result = command.Parse("describe --follow"); 628var result = command.Parse("describe --follow --format json"); 658var result = command.Parse("describe --follow --format json"); 682var result = command.Parse("describe --follow --format json"); 709var result = command.Parse("describe --format json"); 748var result = command.Parse("describe --format json"); 779var result = command.Parse("describe --follow --format json"); 809var result = command.Parse("describe --format json"); 835var result = command.Parse("describe --format json --include-hidden"); 862var result = command.Parse("describe aspire-dashboard --format json"); 887var result = command.Parse("describe --follow --format json"); 915var result = command.Parse("describe --follow --format json --include-hidden"); 961var result = provider.GetRequiredService<RootCommand>().Parse(args); 983var exitCode = await provider.GetRequiredService<RootCommand>().Parse("resources --format mermaid").InvokeAsync().DefaultTimeout(); 1006var exitCode = await provider.GetRequiredService<RootCommand>().Parse($"resources {resource} --format mermaid").InvokeAsync().DefaultTimeout(); 1024var exitCode = await provider.GetRequiredService<RootCommand>().Parse($"resources {resource} --format mermaid").InvokeAsync().DefaultTimeout(); 1038var exitCode = await provider.GetRequiredService<RootCommand>().Parse("resources --format mermaid --follow").InvokeAsync().DefaultTimeout(); 1055var exitCode = await provider.GetRequiredService<RootCommand>().Parse("resources missing --format mermaid").InvokeAsync().DefaultTimeout(); 1076var exitCode = await provider.GetRequiredService<RootCommand>().Parse("resources --format mermaid").InvokeAsync().DefaultTimeout();
Commands\DestroyCommandTests.cs (7)
28var result = command.Parse("destroy --help"); 57var result = command.Parse("destroy --apphost invalid.csproj"); 116var result = command.Parse("destroy"); 152var result = command.Parse(commandLine); 215var result = command.Parse(commandLine); 273var result = command.Parse($"destroy --output-path {testOutputPath}"); 326var result = command.Parse("destroy --yes");
Commands\DoCommandTests.cs (23)
29var result = command.Parse("do --help"); 56var result = command.Parse("do"); 114var result = command.Parse("do my-custom-step"); 167var result = command.Parse("do deploy"); 220var result = command.Parse("do publish"); 278var result = command.Parse("do my-step --output-path test-output"); 310var result = command.Parse("do my-step --apphost invalid.csproj"); 395var result = command.Parse(commandLine); 456var exitCode = await command.Parse("do --list-steps --format json").InvokeAsync().DefaultTimeout(); 502var exitCode = await command.Parse("do --list-steps --format json").InvokeAsync().DefaultTimeout(); 558var result = command.Parse("do deploy --list-steps"); 612var result = command.Parse("do deploy --list-steps"); 641var exitCode = await command.Parse("do --list-steps --format json").InvokeAsync().DefaultTimeout(); 670var exitCode = await command.Parse("do --list-steps --format json").InvokeAsync().DefaultTimeout(); 702var exitCode = await command.Parse("do --list-steps --format json").InvokeAsync().DefaultTimeout(); 732var exitCode = await command.Parse("do --list-steps --format json").InvokeAsync().DefaultTimeout(); 768var exitCode = await command.Parse("do --list-steps --format json").InvokeAsync().DefaultTimeout(); 824var result = command.Parse("do deploy --list-steps"); 839var result = command.Parse("do --help"); 877var exitCode = await command.Parse("do deploy --format yaml").InvokeAsync().DefaultTimeout(); 901var exitCode = await command.Parse(commandLine).InvokeAsync().DefaultTimeout(); 951var result = command.Parse("do my-step --pipeline-log-level debug"); 1006var result = command.Parse("do my-step --log-level Warning");
Commands\DocsCommandTests.cs (10)
24var result = command.Parse("docs"); 42var result = command.Parse("docs list"); 59var result = command.Parse("docs list --format json"); 77var result = command.Parse("docs search redis"); 95var result = command.Parse("docs search redis -n 3"); 113var result = command.Parse("docs search redis --format json"); 130var result = command.Parse("docs get redis-integration"); 147var result = command.Parse("docs get redis-integration --section \"Getting Started\""); 203var result = command.Parse("docs get docs-smoke-test"); 246var result = command.Parse("docs get nonexistent-page");
Commands\DoctorCommandTests.cs (7)
29var result = command.Parse("doctor --help"); 148var result = command.Parse("doctor --format json"); 729var result = command.Parse("doctor --self"); 794var result = command.Parse("doctor"); 848var result = command.Parse("doctor"); 975var result = command.Parse("doctor"); 1023var result = command.Parse(commandLine);
Commands\ExportCommandTests.cs (14)
61var result = command.Parse($"export --output {outputPath}"); 132var result = command.Parse($"export --output {outputPath}"); 165var result = command.Parse($"export --apphost {appHostProjectPath} --output {outputPath}"); 280var result = command.Parse($"export --output {outputPath}"); 342var result = command.Parse($"export --output {outputPath}"); 460var result = command.Parse($"export redis --output {outputPath}"); 518var result = command.Parse($"export webfrontend --output {outputPath}"); 578var result = command.Parse($"export apiservice --output {outputPath}"); 628var result = command.Parse($"export --output {outputPath}"); 670var result = command.Parse($"export --include-hidden --output {outputPath}"); 714var result = command.Parse($"export aspire-dashboard --output {outputPath}"); 750var result = command.Parse($"export nonexistent --output {outputPath}"); 789var result = command.Parse($"export --dashboard-url http://localhost:18888 --api-key test-token --output {outputPath}"); 836var result = command.Parse($"export --output {outputPath}");
Commands\ExtensionInternalCommandTests.cs (8)
37var result = command.Parse("extension --help"); 51var result = command.Parse("extension"); 72var result = command.Parse("extension get-apphosts"); 120var result = command.Parse("extension get-apphosts --nologo"); 149var result = command.Parse("extension get-apphosts"); 188var result = command.Parse("extension get-apphosts"); 206var result = command.Parse("extension get-apphosts"); 220var result = command.Parse("extension get-apphosts --help");
Commands\InitCommandTests.cs (48)
101var parseResult = initCommand.Parse("init"); 146var parseResult = initCommand.Parse($"init{additionalArgs}"); 169var parseResult = initCommand.Parse("init --file-based"); 217var parseResult = command.Parse("init --file-based --language csharp --non-interactive --suppress-agent-init"); 242var parseResult = command.Parse("init --help"); 258var parseResult = initCommand.Parse("init"); 285var parseResult = initCommand.Parse("init"); 366var parseResult = initCommand.Parse("init"); 417var parseResult = initCommand.Parse("init"); 455var parseResult = initCommand.Parse("init --source https://example.test/v3/index.json --version 13.0.0 --channel daily --suppress-agent-init"); 513var parseResult = command.Parse($"init --file-based{languageArgs}"); 557var parseResult = initCommand.Parse($"init{additionalArgs}"); 589var parseResult = initCommand.Parse($"init --language typescript{additionalArgs}"); 639var parseResult = initCommand.Parse($"init --language typescript{additionalArgs}"); 686var parseResult = initCommand.Parse("init --language typescript"); 735var parseResult = initCommand.Parse("init --language typescript"); 752var parseResult = command.Parse("init --non-interactive --skills none"); 774var parseResult = command.Parse("init --non-interactive --agents none"); 796var parseResult = command.Parse($"init --non-interactive --agents copilot --scope {scope} --skills {CommonAgentApplicators.AspireSkillName}"); 824var parseResult = initCommand.Parse("init"); 857var parseResult = initCommand.Parse("init"); 907var parseResult = initCommand.Parse($"init{additionalArgs}"); 949var parseResult = initCommand.Parse("init"); 1037var parseResult = initCommand.Parse("init"); 1090var parseResult = initCommand.Parse("init"); 1145var parseResult = initCommand.Parse("init"); 1194var parseResult = initCommand.Parse("init"); 1230var parseResult = initCommand.Parse("init"); 1265var parseResult = initCommand.Parse("init"); 1301var parseResult = initCommand.Parse("init"); 1343var parseResult = initCommand.Parse("init"); 1374var parseResult = initCommand.Parse("init"); 1418var parseResult = initCommand.Parse("init"); 1470var parseResult = initCommand.Parse("init"); 1518var parseResult = initCommand.Parse("init"); 1572var parseResult = initCommand.Parse("init"); 1624var parseResult = initCommand.Parse("init"); 1694var parseResult = initCommand.Parse("init"); 1779var parseResult = initCommand.Parse("init"); 1847var parseResult = initCommand.Parse("init"); 1897var parseResult = initCommand.Parse("init"); 1943var parseResult = initCommand.Parse("init"); 1980var parseResult = initCommand.Parse("init"); 2029var parseResult = initCommand.Parse("init"); 2091var parseResult = initCommand.Parse("init"); 2142var parseResult = initCommand.Parse("init"); 2209var parseResult = initCommand.Parse("init"); 2256var parseResult = initCommand.Parse("init");
Commands\LogsCommandTests.cs (39)
27var result = command.Parse("logs --help"); 129var result = command.Parse($"logs --tail {tailValue}"); 150var result = command.Parse($"logs --tail {tailValue} --help"); 167var result = command.Parse("logs myresource"); 187var result = command.Parse($"logs --format {format} --help"); 205var result = command.Parse($"logs --format {format} --help"); 220var result = command.Parse("logs --format invalid"); 236var result = command.Parse("logs --follow --tail 50 --help"); 251var result = command.Parse("logs myresource --follow --tail 100 --format json --help"); 267var result = command.Parse("logs -f -n 10 --help"); 381var result = command.Parse("logs --format json"); 411var result = command.Parse("logs"); 438var result = command.Parse($"logs {resourceName} --format json"); 460var result = command.Parse("logs --format json --timestamps"); 498var result = command.Parse("logs --format json"); 537var result = command.Parse("logs --timestamps"); 559var result = command.Parse("logs"); 595var result = command.Parse("logs"); 627var result = command.Parse("logs --format json"); 649var result = command.Parse("logs --format json"); 674var result = command.Parse("logs --format json --include-hidden"); 699var result = command.Parse("logs aspire-dashboard --format json"); 784var result = command.Parse("logs --format json"); 893var result = command.Parse("logs --follow"); 915var result = command.Parse("logs --follow --format json"); 938var result = command.Parse("logs --follow --format json"); 960var result = command.Parse("logs --follow --format json"); 1050var result = command.Parse("logs redis --search timeout --format json"); 1081var result = command.Parse("logs redis --search Ready --format json"); 1110var result = command.Parse("logs redis --search nonexistent --format json"); 1141var result = command.Parse("logs redis --search \"Connection timeout\" --format json"); 1173var result = command.Parse("logs redis --search level:error --format json"); 1208var result = command.Parse("logs redis --search Ready --tail 2 --format json"); 1256var result = command.Parse("logs redis --search Ready --tail 2 --format json"); 1292var result = command.Parse("logs redis --search timeout --tail 1 --format json"); 1337var result = command.Parse("logs --search timeout --tail 1 --format json"); 1386var result = command.Parse("logs --follow --search timeout"); 1415var result = command.Parse("logs redis --follow --tail 10 --search timeout"); 1460var result = command.Parse("logs redis --follow --tail 10 --search timeout");
Commands\LsCommandTests.cs (22)
33var result = command.Parse("ls --help"); 48var result = command.Parse("ls"); 66var result = command.Parse($"ls --format {format}"); 81var result = command.Parse("ls --format invalid"); 112var result = command.Parse("ls --format json"); 152var result = command.Parse("ls --format json"); 193var result = command.Parse("ls --format json"); 234var result = command.Parse("ls --format json"); 266var result = command.Parse("ls --format json"); 307var result = command.Parse("ls --format json --stream"); 349var result = command.Parse("ls --format json --stream"); 394var result = command.Parse("ls --format json --stream"); 441var result = command.Parse("ls --format json --stream"); 485var result = command.Parse("ls --format json --stream"); 507var result = command.Parse("ls --stream"); 539var result = command.Parse("ls"); 578var result = command.Parse("ls"); 646var result = command.Parse("ls"); 689var result = command.Parse("ls"); 718var result = command.Parse("ls"); 747var result = command.Parse("ls --all"); 785var result = command.Parse("ls --format json --all");
Commands\McpCommandTests.cs (7)
21var result = command.Parse("mcp"); 36var result = command.Parse("mcp --help"); 50var result = command.Parse("mcp start --help"); 108var result = command.Parse("agent"); 123var result = command.Parse("agent --help"); 137var result = command.Parse("agent mcp --help"); 151var result = command.Parse("agent init --help");
Commands\NewCommandChannelResolutionTests.cs (2)
111var parseResult = newCommand.Parse("new aspire-starter --name TestApp --output ./output --use-redis-cache --test-framework None"); 605var parseResult = newCommand.Parse($"new fake-template --name TestApp --output ./captured{channelArg}{versionArg}{sourceArg}");
Commands\NewCommandTemplateConfigPersistenceTests.cs (2)
294var parseResult = newCommand.Parse(string.Join(" ", commandArguments)); 398var parseResult = newCommand.Parse(
Commands\NewCommandTests.cs (77)
39var result = command.Parse("new --help"); 113var configResult = configCommand.Parse($"config set -g overrideStagingFeed {stagingFeed}"); 142var result = command.Parse($"new {KnownTemplateId.CSharpEmptyAppHost} --language csharp --name TemplateOut --output ./TemplateOut --localhost-tld false"); 170var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 194var result = command.Parse($"new aspire-starter --use-redis-cache --test-framework {testFramework}"); 250var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 283var result = command.Parse("new aspire-starter --name MyApp --output ./output --use-redis-cache --test-framework None"); 315var result = command.Parse("new aspire-starter --output notsrc --use-redis-cache --test-framework None"); 393var result = command.Parse("new aspire-starter --channel stable --use-redis-cache --test-framework None"); 470var result = command.Parse("new aspire-starter --channel stable --use-redis-cache --test-framework None"); 547var result = command.Parse("new aspire-starter --channel pr-12345 --name TestApp --output ./output --use-redis-cache --test-framework None"); 586var result = command.Parse("new aspire-starter --name MyApp --output ./output --use-redis-cache --test-framework None"); 618var result = command.Parse("new aspire-starter --name MyApp --output ./output --use-redis-cache --test-framework None --version 9.2.0"); 654var result = command.Parse("new"); 695var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 790var result = command.Parse("new aspire-starter --name TestApp --output ./output"); 853var result = command.Parse($"new aspire-starter --use-redis-cache --test-framework None"); 912var result = command.Parse("new --name TestApp --output ./output"); 982var result = command.Parse("new --name TestApp --output ./output"); 1017var result = command.Parse("new aspire-empty --name TestApp --output ./output"); 1078var result = command.Parse("new aspire-empty --name TestApp --output ./output"); 1141var result = command.Parse("new aspire-empty --name TestApp --output ./output"); 1169var result = command.Parse("new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init"); 1239var result = command.Parse($"new aspire-empty --name TestApp --output ./output --language csharp --localhost-tld false --suppress-agent-init --channel staging --source {sourceOverride}"); 1284var result = command.Parse("new aspire-empty --name TestApp --output ./output --language csharp --localhost-tld false --suppress-agent-init --channel staging --source relative-feed"); 1333var result = command.Parse($"new aspire-empty --name TestApp --output ./output --language {language} --localhost-tld false --suppress-agent-init --source \"{sourceOverride}\""); 1357var result = command.Parse($"new aspire-empty --name TestApp --output ./output --language csharp --localhost-tld false --suppress-agent-init --source \"{sourceOverride}\""); 1392var result = command.Parse($"new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init --source {sourceOverride}"); 1426var result = command.Parse("new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init --source nuget.org"); 1460var result = command.Parse("new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init"); 1499var result = command.Parse("new aspire-java-empty --name TestApp --output ./output --localhost-tld false"); 1535var result = command.Parse("new aspire-py-empty --name TestApp --output ./output --localhost-tld false"); 1552var result = command.Parse("new aspire-empty --name TestApp --output ./output --localhost-tld false"); 1581var result = command.Parse("new aspire-empty --name TestApp --output ./output --localhost-tld false --suppress-agent-init"); 1615var result = command.Parse($"new aspire-empty --name TestApp --output ./output --version {version} --localhost-tld false --suppress-agent-init"); 1643var result = command.Parse("new aspire-empty --name TestApp --output ./output --localhost-tld false --suppress-agent-init"); 1677var result = command.Parse("new aspire-empty --name TestApp --output ./output --localhost-tld --suppress-agent-init"); 1751var result = command.Parse("new aspire-empty --name TestApp --output ./output"); 1792var result = command.Parse("new aspire-ts-empty --name TestApp --output ./output --localhost-tld false"); 1840var result = command.Parse("new aspire-ts-empty --name TestApp --output ./output --channel stable --localhost-tld false"); 1881var result = command.Parse("new aspire-ts-empty --name TestApp --localhost-tld false"); 1959var result = command.Parse("new aspire-ts-empty --name TestApp --output ./output"); 2038var result = command.Parse("new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false"); 2103var result = command.Parse("new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false"); 2162var result = command.Parse($"new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false --source \"{sourceOverride}\""); 2218var result = command.Parse($"new aspire-starter --name TestApp --output ./output --source {sourceOverride} --use-redis-cache --test-framework None"); 2274var result = command.Parse($"new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false --source {sourceOverride}"); 2302var result = command.Parse("new aspire-empty --name TestApp --output ./output"); 2327var result = command.Parse("new aspire-empty --name TestApp --output ./output --agents none"); 2352var result = command.Parse($"new aspire-empty --name TestApp --output ./output --agents copilot --skills {CommonAgentApplicators.AspireSkillName}"); 2400var result = command.Parse("new"); 2446var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 2490var result = command.Parse($"new aspire-starter --name MyProject --output {Path.Combine(workspace.WorkspaceRoot.FullName, "my-project")} --use-redis-cache --test-framework None"); 2533var result = command.Parse($"new aspire-starter --name MyProject --output {outputDir} --use-redis-cache --test-framework None --suppress-agent-init"); 2580var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 2619var result = command.Parse("new aspire-ts-empty --name TestApp --output ./output"); 2674var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 2733var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 2790var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 2852var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 2914var result = command.Parse($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false"); 2977var result = command.Parse($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false"); 3055var result = command.Parse( 3130var result = command.Parse($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false --suppress-agent-init"); 3199var result = command.Parse($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false --suppress-agent-init"); 3253var result = command.Parse($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false"); 3297var result = command.Parse("new aspire-empty --name TestApp --output ./output --localhost-tld false"); 3328var result = command.Parse("new aspire-empty --name TestApp --output ./output --suppress-agent-init"); 3355var result = command.Parse("new aspire-empty --name TestApp --output ./output --suppress-agent-init=false"); 3384var result = command.Parse("new aspire-empty --name TestApp --output ./output"); 3409var result = provider.GetRequiredService<NewCommand>().Parse( 3443var result = command.Parse($"new aspire-starter --name TestApp --output {existingDir.FullName} --use-redis-cache --test-framework None"); 3465var result = command.Parse($"new aspire-starter --name TestApp --output {emptyDir.FullName} --use-redis-cache --test-framework None"); 3500var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 3525var result = command.Parse($"new aspire-starter --name TestApp --output {invalidPath} --use-redis-cache --test-framework None"); 3571var result = command.Parse("new aspire-starter --name TestApp --output . --use-redis-cache --test-framework None"); 3630var result = command.Parse("new aspire-starter");
Commands\OptionWithLegacyTests.cs (2)
19var result = command.Parse("test --new-name primary-value --old-name legacy-value"); 34var result = command.Parse("test --old-name legacy-value");
Commands\PsCommandTests.cs (22)
42var result = command.Parse("ps --help"); 57var result = command.Parse("ps"); 76var result = command.Parse($"ps --format {format}"); 94var result = command.Parse($"ps --format {format}"); 109var result = command.Parse("ps --format invalid"); 161var result = command.Parse($"ps --format json {outputOption}"); 213var result = command.Parse("ps --format json"); 251var result = command.Parse("ps --format json"); 297var result = command.Parse("ps --format json"); 339var result = command.Parse("ps --format json"); 385var result = command.Parse("ps"); 418var result = command.Parse("ps"); 459var result = command.Parse("ps"); 482var result = command.Parse("ps --format json"); 518var result = command.Parse("ps --format json"); 558var result = command.Parse("ps --format json --follow"); 601var exitCode = await command.Parse("ps --format json --follow") 644var result = command.Parse("ps --follow"); 692var result = command.Parse("ps --format json --follow"); 736var result = command.Parse("ps --format json"); 783var result = command.Parse("ps --format json"); 822var result = command.Parse("ps --format json");
Commands\PublishCommandPromptingIntegrationTests.cs (20)
47var result = command.Parse("publish"); 93var result = command.Parse("publish"); 145var result = command.Parse("publish"); 192var result = command.Parse("publish"); 238var result = command.Parse("publish"); 287var result = command.Parse("publish"); 322var result = command.Parse("publish"); 370var result = command.Parse("publish"); 449var result = command.Parse("publish"); 517var result = command.Parse("publish"); 569var result = command.Parse("publish"); 624var result = command.Parse("publish"); 695var result = command.Parse("publish --debug"); 739var result = command.Parse("publish"); 782var result = command.Parse("publish"); 831var result = command.Parse("publish"); 877var result = command.Parse("publish"); 917var result = command.Parse("publish"); 963var result = command.Parse("publish"); 997var result = command.Parse("publish");
Commands\PublishCommandTests.cs (6)
24var result = command.Parse("publish --help"); 52var result = command.Parse("publish --apphost invalid.csproj"); 83var result = command.Parse("publish --apphost valid.csproj"); 114var result = command.Parse("publish --apphost valid.csproj"); 157var result = command.Parse("publish --apphost valid.csproj"); 226var result = command.Parse("publish");
Commands\ResourceCommandHelpParserTests.cs (4)
18command.Parse("resource web wait-for-browser --help"), 35command.Parse("resource web wait-for-browser --apphost ./AppHost/AppHost.csproj --help"), 53command.Parse("resource web wait-for-browser --project ./AppHost/AppHost.csproj --help"), 79command.Parse(commandLine),
Commands\ResourceCommandTests.cs (73)
30var result = command.Parse("resource --help"); 62var result = command.Parse("resource web --non-interactive --help"); 93var result = command.Parse("resource web --help"); 118var result = command.Parse("resource web --help"); 141var result = command.Parse("resource web --help"); 182var result = command.Parse($"""resource web --apphost "{appHostDirectory.FullName}" --help"""); 229var result = command.Parse($"""resource web --apphost "{appHostProjectFile.FullName}" --help"""); 272var result = command.Parse($"""resource web --apphost "{symlinkedAppHostPath}" --help"""); 301var result = command.Parse("resource hidden-worker --include-hidden --help"); 317var result = command.Parse("resource"); 336var result = command.Parse($"""resource {arguments}"""); 353var result = command.Parse("resource myresource"); 373var result = command.Parse($"""resource myresource {arguments}"""); 390var result = command.Parse("resource myresource my-command --help"); 404var result = command.Parse("resource myresource my-command --apphost /path/to/project.csproj --help"); 426var result = command.Parse($"resource myresource {commandName} --help"); 458var result = command.Parse($"resource myresource {commandName}"); 497var result = command.Parse("resource myresource my-command"); 522var result = command.Parse("resource myresource start --apphost /path/to/project.csproj --help"); 545var result = command.Parse("resource myresource Start"); 582var result = command.Parse("""resource web-browser-automation fill-browser "#name" Aspire"""); 609var result = command.Parse("""resource web-browser-automation click-browser"""); 646var result = command.Parse("""resource web-browser-automation wait-for-browser "--text=Submitted Aspire!" --timeoutMilliseconds=500"""); 684var result = command.Parse("resource mydb configure -- --AppHost primary"); 719var result = command.Parse("resource greeting parameter-set --value \"Hello world\""); 779var result = command.Parse("""resource web-browser-automation navigate-browser "https://example.com/?q=aspire" """); 806var result = command.Parse("""resource web-browser-automation click-browser "#submit" extra"""); 833var result = command.Parse("""resource web-browser-automation click-browser --selector "#submit" --count 2"""); 860var result = command.Parse("""resource web-browser-automation configure --verbose"""); 880var result = command.Parse("""resource web-browser-automation configure -- --selector "#submit" """); 916var result = command.Parse("""resource web-browser-automation wait-for-browser --timeout-milliseconds 500"""); 944var result = command.Parse("""resource web-browser-automation Configure --message hello"""); 980var result = command.Parse("""resource web-browser-automation configure --timeout-milliseconds=500 --proxy"""); 1011var result = command.Parse($"""resource web-browser-automation configure {arguments}"""); 1046var result = command.Parse("""resource web-browser-automation configure --flavor chocolate"""); 1082var result = command.Parse("""resource web-browser-automation configure --flavor strawberry"""); 1112var result = command.Parse("""resource web-browser-automation configure --unknown value"""); 1138var result = command.Parse("""resource web-browser-automation configure --mm ss"""); 1165var result = command.Parse("""resource web-browser-automation configure --proxy maybe"""); 1194var result = command.Parse("""resource web-browser-automation configure --save-to-user-secrets true"""); 1234var result = command.Parse("""resource web-browser-automation configure --timeout-seconds 0"""); 1269var result = command.Parse("resource myresource my-command"); 1302var result = command.Parse("""resource web configure"""); 1338var result = command.Parse("""resource web-browser-automation configure --flavor strawberry"""); 1368var result = command.Parse("""resource web-browser-automation configure"""); 1401var result = command.Parse($"""resource web-browser-automation configure {arguments}"""); 1430var result = command.Parse("""resource web-browser-automation configure --timeoutMilliseconds 1 --timeout-milliseconds 2"""); 1459var result = command.Parse("""resource web-browser-automation configure --message first --message second"""); 1489var result = command.Parse("""resource web-browser-automation wait-for-browser --timeout-milliseconds 500"""); 1521var result = command.Parse("""resource web-browser-automation wait-for-browser"""); 1559var result = command.Parse("""resource web-browser-automation wait-for-browser --timeout-milliseconds not-a-number"""); 1595var result = command.Parse("""resource web-browser-automation fill-browser --selector "#name" Aspire"""); 1630var result = command.Parse("""resource web-browser-automation configure -- --log-level Debug"""); 1659var result = command.Parse("""resource web-browser-automation configure -- --message "from delimiter" --timeout-milliseconds 10"""); 1688var result = command.Parse("resource hidden-worker configure --include-hidden -- --message \"from hidden resource\""); 1717var result = command.Parse("""resource web-browser-automation configure --log-level Debug"""); 1752var result = command.Parse("""resource web-browser-automation configure --no-proxy localhost"""); 1796var result = command.Parse("""resource web-browser-automation configure --load-arguments -- --browser Chrome"""); 1840var result = command.Parse("""resource web-browser-automation configure --load-arguments -- --browser Chrome"""); 1876var result = command.Parse("""resource web-browser-automation configure --load-arguments -- --browser Chrome"""); 1915var result = command.Parse("""resource argument-commands dependent-arguments --load-arguments -- --category fruit"""); 1949var result = command.Parse("""resource argument-commands dependent-arguments -- --category=fruit --item=banana --quantity=2 --priority=express"""); 1989var result = command.Parse("""resource web-browser-automation configure --no-proxy"""); 2006var result = command.Parse("""resource myresource --help"""); 2045var result = command.Parse("""resource web-browser-automation wait-for-browser --help"""); 2079var result = command.Parse("""resource web-browser-automation wait-for-browser --help -- --selector #main"""); 2109var result = command.Parse("""resource web-browser-automation custom-command -- --help"""); 2147var result = command.Parse("""resource web-browser-automation configure --help"""); 2177var result = command.Parse("""resource web-browser-automation configure --help"""); 2214var result = command.Parse("""resource web-browser-automation configure --help"""); 2235var result = command.Parse("""resource web-browser-automation configure --help"""); 2261var result = command.Parse("""resource web-browser-automation configure --help"""); 2312var result = command.Parse("""resource argument-commands all-argument-types --help""");
Commands\RestoreCommandTests.cs (2)
40var result = command.Parse($"restore --apphost {appHostFile.FullName}"); 78var result = command.Parse($"restore --apphost {appHostFile.FullName}");
Commands\RootCommandTests.cs (9)
31var result = command.Parse("--version"); 54var result = command.Parse("-v"); 79var result = command.Parse("--version"); 130var result = command.Parse("--version"); 188var result = command.Parse("--help"); 202var result = command.Parse("--nologo --help"); 221var result = command.Parse("--help"); 241var result = command.Parse("run --capture-profile --capture-profile-output profile.zip --capture-profile-delay 1"); 322var result = command.Parse("--help");
Commands\RunCommandTests.cs (66)
52var result = command.Parse("run --help"); 91var pendingRun = command.Parse($"run --apphost \"{appHostFile.FullName}\" {arguments}") 344var result = command.Parse("run"); 387var result = command.Parse($"run --apphost {appHostFile.FullName}"); 428var result = command.Parse($"run --apphost {appHostFile.FullName}"); 476var result = command.Parse($"run --apphost {appHostFile.FullName}"); 543var result = command.Parse($"run --apphost {appHostFile.FullName}"); 635var result = command.Parse($"run --apphost {appHostFile.FullName}"); 703var result = command.Parse($"run --apphost {appHostFile.FullName}"); 756var result = command.Parse("run"); 839var pendingCommand = command.Parse($"run --apphost {appHostFile.FullName}") 931var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1032var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1130var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1210var result = command.Parse("run"); 1237var result = command.Parse("run"); 1267var result = command.Parse("run"); 1285var result = command.Parse("run"); 1302var result = command.Parse("run --apphost /tmp/doesnotexist.csproj"); 1366var result = command.Parse($"run --apphost {appHostProjectFile.FullName}"); 1396var result = command.Parse("run"); 1426var result = command.Parse("run"); 1455var result = command.Parse($"run --apphost {appHostProjectFile.FullName}"); 1515var result = command.Parse($"run --apphost {appHostProjectFile.FullName}"); 1538var result = command.Parse("run --detach"); 1568var parentResult = parentCommand.Parse($"run --detach --apphost {appHostFile.FullName}"); 1607var childResult = childCommand.Parse("run"); 1683var result = command.Parse("run"); 1789var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1859var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1927var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1984var result = command.Parse($"run --apphost {appHostFile.FullName}"); 2043var result = command.Parse($"run --apphost {appHostFile.FullName}"); 2114var result = command.Parse($"run --apphost {appHostFile.FullName}"); 2224var pendingCommand = command.Parse($"run --apphost {appHostFile.FullName}") 2307var result = command.Parse($"run --apphost {appHostFile.FullName}"); 2368var result = command.Parse($"run --apphost {appHostFile.FullName}"); 2420var result = command.Parse($"run --apphost {appHostFile.FullName}"); 2492var result = command.Parse($"run --apphost {appHostFile.FullName}"); 2649var result = command.Parse("run"); 2717var result = command.Parse("run"); 2848var result = command.Parse("run"); 2906var result = command.Parse("run"); 2954var result = command.Parse("run --capture-profile"); 2997var result = command.Parse("run --capture-profile"); 3048var result = command.Parse("run --capture-profile"); 3099var result = command.Parse("run"); 3210var result = command.Parse("run"); 3316var result = command.Parse("run"); 3386var result = command.Parse("run"); 3455var result = command.Parse("run --start-debug-session"); 3515var result = command.Parse("run"); 3579var result = command.Parse("run"); 3646var result = command.Parse("run"); 3705var result = command.Parse("run"); 3760var result = command.Parse("run"); 3817var result = command.Parse("run"); 3876var result = command.Parse("run"); 4283var result = command.Parse("run --no-build"); 4364var result = command.Parse("run --isolated"); 4425var result = command.Parse("run --no-build"); 4441var result = command.Parse("run -- --custom-arg value --launch-profile E2E"); 5070var result = command.Parse(explicitAppHost ? $"run --apphost \"{appHostFile.FullName}\"" : "run"); 5291var result = command.Parse("run --non-interactive"); 5364var result = command.Parse("run --no-build"); 5419var result = command.Parse(args);
Commands\Sdk\SdkExportCommandTests.cs (1)
352return await command.Parse(commandLine).InvokeAsync().DefaultTimeout();
Commands\SdkCommandTests.cs (2)
21var result = command.Parse("sdk"); 36var result = command.Parse("sdk --help");
Commands\SdkDumpCommandTests.cs (15)
34var result = command.Parse("sdk dump --help"); 56var result = command.Parse($"sdk dump --format {format}"); 69var result = command.Parse("sdk dump /nonexistent/path/to/integration.csproj"); 84var result = command.Parse("sdk dump @13.2.0"); 99var result = command.Parse("sdk dump Aspire.Hosting.Redis@"); 114var result = command.Parse("sdk dump Aspire.Hosting.Redis@not-a-version!!!"); 129var result = command.Parse("sdk dump some-random-string"); 144var result = command.Parse("sdk dump Aspire.Hosting.Redis@13.2.0"); 157var result = command.Parse("sdk dump Aspire.Hosting.Redis@13.2.0 Aspire.Hosting.PostgreSQL@13.2.0"); 170var result = command.Parse("sdk dump --format ci --output-directory ./ats Aspire.Hosting.Redis@13.2.0"); 183var result = command.Parse("sdk dump --format ci --output ./all.ats.txt --output-directory ./ats Aspire.Hosting.Redis@13.2.0"); 198var result = command.Parse("sdk dump --output-directory ./ats Aspire.Hosting.Redis@13.2.0"); 213var result = command.Parse("sdk dump --format ci --output-directory ./ats"); 228var result = command.Parse("sdk dump Aspire.Hosting.Redis@13.2.0-preview.1"); 243var result = command.Parse("sdk dump Aspire.Hosting.Redis@@13.2.0");
Commands\SdkInstallerTests.cs (6)
46var result = command.Parse("run"); 71var result = command.Parse("add"); 94var result = command.Parse("new aspire-starter"); 133var result = command.Parse("publish"); 171var result = command.Parse("deploy"); 193var result = command.Parse("run");
Commands\SecretCommandTests.cs (30)
37var result = command.Parse($"secret path --apphost \"{appHostFile.FullName}\""); 63var result = command.Parse($"secret path --apphost \"{appHostFile.FullName}\""); 90var setResult = command.Parse($"secret set --environment Production Parameters:api_key prod-secret --apphost \"{appHostFile.FullName}\""); 98var getResult = command.Parse($"secret get --environment Production Parameters:api_key --apphost \"{appHostFile.FullName}\""); 105var listResult = command.Parse($"secret list --environment Production --format json --apphost \"{appHostFile.FullName}\""); 111var defaultGetResult = command.Parse($"secret get Parameters:api_key --apphost \"{appHostFile.FullName}\""); 116var deleteResult = command.Parse($"secret delete --environment Production Parameters:api_key --apphost \"{appHostFile.FullName}\""); 121var deletedGetResult = command.Parse($"secret get --environment Production Parameters:api_key --apphost \"{appHostFile.FullName}\""); 142Assert.Equal(CliExitCodes.Success, await command.Parse($"secret set --environment Production Parameters:key prod-secret {projectOption}").InvokeAsync().DefaultTimeout()); 146Assert.Equal(CliExitCodes.Success, await command.Parse($"secret set Parameters:key dev-secret {projectOption}").InvokeAsync().DefaultTimeout()); 152Assert.Equal(CliExitCodes.Success, await command.Parse($"secret get --environment Production Parameters:key {projectOption}").InvokeAsync().DefaultTimeout()); 156Assert.Equal(CliExitCodes.Success, await command.Parse($"secret list --all --format json {projectOption}").InvokeAsync().DefaultTimeout()); 160Assert.Equal(CliExitCodes.Success, await command.Parse($"secret delete --environment Production Parameters:key {projectOption}").InvokeAsync().DefaultTimeout()); 161Assert.Equal(CliExitCodes.ConfigNotFound, await command.Parse($"secret get --environment Production Parameters:key {projectOption}").InvokeAsync().DefaultTimeout()); 176Assert.Equal(CliExitCodes.Success, await command.Parse( 180Assert.Equal(CliExitCodes.Success, await command.Parse( 206var setDevelopmentResult = command.Parse($"secret set Parameters:api_key dev-secret --apphost \"{appHostFile.FullName}\""); 213var setProductionResult = command.Parse($"secret set --environment Production Azure:SubscriptionId prod-subscription --apphost \"{appHostFile.FullName}\""); 219var listAllResult = command.Parse($"secret list --all --format json --apphost \"{appHostFile.FullName}\""); 259var getLegacyResult = command.Parse($"secret get Legacy:Value --apphost \"{appHostFile.FullName}\""); 265var setResult = command.Parse($"secret set New:Value new --apphost \"{appHostFile.FullName}\""); 303var result = command.Parse($"secret {arguments} --environment \"{environment}\""); 325Assert.Equal(CliExitCodes.Success, await command.Parse($"secret set Parameters:key initial -e {originalEnvironment} {projectOption}").InvokeAsync().DefaultTimeout()); 326Assert.Equal(CliExitCodes.Success, await command.Parse($"secret set Parameters:key updated -e {alternateEnvironment} {projectOption}").InvokeAsync().DefaultTimeout()); 329Assert.Equal(CliExitCodes.Success, await command.Parse($"secret get Parameters:key -e {alternateEnvironment} {projectOption}").InvokeAsync().DefaultTimeout()); 333Assert.Equal(CliExitCodes.Success, await command.Parse($"secret list --all --format json {projectOption}").InvokeAsync().DefaultTimeout()); 339Assert.Equal(CliExitCodes.Success, await command.Parse($"secret path -e {alternateEnvironment} {projectOption}").InvokeAsync().DefaultTimeout()); 342Assert.Equal(CliExitCodes.Success, await command.Parse($"secret delete Parameters:key -e {alternateEnvironment} {projectOption}").InvokeAsync().DefaultTimeout()); 343Assert.Equal(CliExitCodes.ConfigNotFound, await command.Parse($"secret get Parameters:key -e {originalEnvironment} {projectOption}").InvokeAsync().DefaultTimeout()); 373var exitCode = await command.Parse($"secret {arguments} -e Production --apphost \"{appHostFile.FullName}\"")
Commands\StartCommandTests.cs (28)
34var result = command.Parse("start --help"); 54var result = command.Parse("start --help"); 71var result = command.Parse("start --no-build --help"); 85var result = command.Parse("start --format json --help"); 99var result = command.Parse("start --isolated --help"); 182var result = command.Parse("start"); 200var result = command.Parse("start -- --custom-arg value --launch-profile E2E"); 286var result = command.Parse("start"); 316var result = command.Parse("start --format json"); 361var result = command.Parse($"start --apphost {appHostFile.FullName}"); 477var result = command.Parse("start"); 506var result = command.Parse($"start --apphost {appHostFile.FullName} --start-debug-session"); 531var result = provider.GetRequiredService<RootCommand>().Parse($"start --apphost {appHostFile.FullName}"); 569var result = command.Parse($"start --apphost {appHostFile.FullName}"); 605var result = command.Parse(string.Format(CultureInfo.InvariantCulture, commandTemplate, appHostFile.FullName)); 625Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("start"))); 626Assert.True(AppHostLauncher.ResolveIsolated(command.Parse("start --isolated"))); 627Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("start --isolated false"))); 628Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("run"))); 629Assert.True(AppHostLauncher.ResolveIsolated(command.Parse("run --isolated"))); 630Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("run --isolated false"))); 644Assert.Equal(expected, AppHostLauncher.GetExplicitIsolated(command.Parse(commandLine))); 657Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("start"))); 658Assert.True(AppHostLauncher.ResolveIsolated(command.Parse("start --isolated"))); 659Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("start --isolated false"))); 660Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("run"))); 661Assert.True(AppHostLauncher.ResolveIsolated(command.Parse("run --isolated"))); 662Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("run --isolated false")));
Commands\StopCommandTests.cs (39)
37var result = command.Parse("stop --help"); 52var result = command.Parse("stop myresource"); 197var exitCode = await command.Parse(commandLine).InvokeAsync().DefaultTimeout(); 216var result = provider.GetRequiredService<RootCommand>().Parse(commandLine); 244var result = provider.GetRequiredService<RootCommand>().Parse($"stop --pid {int.MaxValue - 1}"); 284.Parse($"stop --pid {int.MaxValue - 1}").InvokeAsync().DefaultTimeout(); 314var exitCode = await provider.GetRequiredService<RootCommand>().Parse(commandLine).InvokeAsync().DefaultTimeout(); 338var result = command.Parse("stop --apphost missing-directory"); 369var result = command.Parse($"stop --apphost \"{appHostDirectory.FullName}\""); 403var result = command.Parse("stop --all"); 439var result = command.Parse("stop --all"); 475var result = command.Parse("stop"); 528var result = command.Parse("stop"); 562var result = command.Parse($"stop --apphost \"{appHostFile.FullName}\""); 603var result = command.Parse("stop"); 642var result = command.Parse("stop"); 683var result = command.Parse("stop --all"); 724var result = command.Parse(commandLine); 760var result = command.Parse($"stop --force{volumesOption} --apphost \"{appHostFile.FullName}\""); 794var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 840var result = command.Parse("stop --force"); 878var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 912var result = command.Parse("stop --force"); 951var result = command.Parse("stop --force"); 988var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 1031var result = command.Parse($"stop --force{volumesOption} --apphost \"{appHostFile.FullName}\""); 1071var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 1110var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 1154var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 1196var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 1238var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 1276var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 1314var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 1348var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 1385var result = command.Parse("stop --force"); 1423var result = command.Parse("stop --force"); 1443var result = command.Parse("stop --force --all"); 1465var result = command.Parse("stop --volumes"); 1504var result = command.Parse("stop");
Commands\TelemetryCommandTests.cs (3)
32var result = command.Parse("otel"); 297var result = command.Parse($"otel {otelCommand} --dashboard-url http://localhost:18888"); 383var result = command.Parse(
Commands\TelemetryFollowTests.cs (1)
276var parsed = command.Parse($"otel {commandName} --format Json{(follow ? " --follow" : "")}{(standalone ? " --dashboard-url http://localhost:18888" : "")}");
Commands\TelemetryLogsCommandTests.cs (16)
30var result = command.Parse("otel logs"); 48var result = command.Parse($"telemetry logs --limit {limitValue}"); 74var result = command.Parse("otel logs"); 109var result = command.Parse("otel logs"); 139var result = command.Parse("otel logs"); 219var result = command.Parse("otel logs --dashboard-url http://localhost:18888"); 271var result = command.Parse("otel logs --dashboard-url http://localhost:18888 --api-key my-secret-key"); 293var result = command.Parse("otel logs --dashboard-url http://localhost:18888 --apphost TestAppHost.csproj"); 359var result = command.Parse("otel logs --dashboard-url http://localhost:18888"); 402var result = command.Parse("otel logs --dashboard-url http://localhost:18888"); 441var result = command.Parse("otel logs --dashboard-url http://localhost:18888"); 471var result = command.Parse("otel logs --dashboard-url http://localhost:18888/login?t=sometoken"); 511var result = command.Parse("otel logs --dashboard-url http://localhost:18888"); 567var result = command.Parse("otel logs --dashboard-url http://localhost:18888/login?t=abc123"); 649var result = command.Parse("otel logs --format json --dashboard-url http://localhost:18888"); 715var result = command.Parse("otel logs --dashboard-url http://localhost:18888 --search timeout");
Commands\TelemetrySpansCommandTests.cs (11)
29var result = command.Parse("otel spans"); 47var result = command.Parse($"telemetry spans --limit {limitValue}"); 73var result = command.Parse("otel spans"); 108var result = command.Parse("otel spans"); 192var result = command.Parse("otel spans --dashboard-url http://localhost:18888"); 216var result = command.Parse("otel spans --dashboard-url http://localhost:18888 --apphost TestAppHost.csproj"); 254var result = command.Parse("otel spans --dashboard-url http://localhost:18888"); 294var result = command.Parse("otel spans --dashboard-url http://localhost:18888"); 378var result = command.Parse("otel spans --format json --dashboard-url http://localhost:18888"); 449var result = command.Parse("otel spans --dashboard-url http://localhost:18888 --search \"GET /index\""); 496var result = command.Parse("otel spans --dashboard-url http://localhost:18888 --search \"duration:>=50.5\"");
Commands\TelemetryTracesCommandTests.cs (13)
31var result = command.Parse("otel traces"); 129var result = command.Parse("otel traces --format json -n 5"); 215var result = command.Parse("otel traces --format json -n 5 --dashboard-url http://dashboard.dev.localhost:18888"); 244var result = command.Parse($"telemetry traces --limit {limitValue}"); 270var result = command.Parse("otel traces"); 321var result = command.Parse("otel traces"); 437var result = command.Parse("otel traces --dashboard-url http://localhost:18888"); 461var result = command.Parse("otel traces --dashboard-url http://localhost:18888 --apphost TestAppHost.csproj"); 499var result = command.Parse("otel traces --dashboard-url http://localhost:18888"); 582var result = command.Parse("otel traces --format json --dashboard-url http://localhost:18888"); 666var result = command.Parse("otel traces --trace-id abc1234567890def --format json --dashboard-url http://localhost:18888"); 715var result = command.Parse("otel traces --dashboard-url http://localhost:18888 --search frontend"); 762var result = command.Parse("otel traces --dashboard-url http://localhost:18888 --search \"duration:>=50.5\"");
Commands\TerminalCommandTests.cs (20)
25var result = command.Parse("terminal --help"); 41var result = command.Parse("terminal"); 55var result = command.Parse("terminal attach"); 69var result = command.Parse("terminal attach myresource"); 89var result = command.Parse("terminal attach myresource"); 109var result = command.Parse("terminal attach does-not-exist"); 134var result = command.Parse("terminal attach myresource"); 159var result = command.Parse("terminal attach myresource"); 200var result = command.Parse("terminal attach myresource --replica 99"); 239var result = command.Parse("terminal attach myresource"); 285var result = command.Parse("terminal attach myresource"); 302var result = command.Parse("terminal ps"); 325var result = command.Parse("terminal ps"); 349var result = command.Parse("terminal ps"); 396var result = command.Parse("terminal ps"); 431var result = command.Parse("terminal ps --format json"); 554var result = command.Parse("terminal ps --format json --verbose"); 665var result = command.Parse("terminal ps --format json"); 737var result = command.Parse("terminal ps --format json"); 777var result = command.Parse("terminal ps --format json");
Commands\TerminalCommandViewerOptionTests.cs (3)
26var result = command.Parse("terminal attach --help"); 54var result = command.Parse("terminal attach myresource"); 69var result = command.Parse("terminal attach myresource --viewer");
Commands\TerminalTapePlayCommandTests.cs (13)
29var result = provider.GetRequiredService<RootCommand>().Parse(arguments); 41var result = provider.GetRequiredService<RootCommand>().Parse("terminal tape play shell --tape-file probe.tape"); 101var result = provider.GetRequiredService<RootCommand>().Parse("terminal tape play shell --tape-file probe.tape"); 187var result = provider.GetRequiredService<RootCommand>().Parse( 233var result = provider.GetRequiredService<RootCommand>().Parse( 287var result = provider.GetRequiredService<RootCommand>().Parse( 394var invalid = command.Parse("terminal tape play shell --tape-file play.tape"); 401var valid = command.Parse("terminal tape play shell --tape-file play.tape"); 417var result = provider.GetRequiredService<RootCommand>().Parse("terminal tape play shell --tape-file wait.tape"); 435var result = provider.GetRequiredService<RootCommand>().Parse("terminal tape play shell --tape-file wait.tape --timeout 5"); 454var result = provider.GetRequiredService<RootCommand>().Parse("terminal tape play shell --tape-file wait.tape"); 473var result = provider.GetRequiredService<RootCommand>().Parse("terminal tape play shell --tape-file wait.tape"); 491var 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(); 190Assert.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(); 508var result = provider.GetRequiredService<RootCommand>().Parse(arguments); 529Assert.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)
38var result = command.Parse($"ps {outputOption} --follow --format json --non-interactive --nologo"); 72.Parse("ps --output snapshot --follow --format json --non-interactive --nologo") 95var result = provider.GetRequiredService<RootCommand>().Parse(arguments); 118var exitCode = await provider.GetRequiredService<RootCommand>().Parse(arguments).InvokeAsync().DefaultTimeout(); 240var result = provider.GetRequiredService<RootCommand>().Parse($"stop {options} --apphost \"{path}\""); 288var 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)
40var result = command.Parse("update --help"); 73var result = command.Parse(commandLine); 125var result = command.Parse($"update --apphost {appHostProjectFile.FullName}"); 174var result = command.Parse($"update --apphost AppHost.csproj"); 287var result = command.Parse("update"); 364var result = command.Parse("update --apphost AppHost.csproj --channel stable"); 414var exitCode = await command.Parse("update --apphost apphost.ts --channel stable --migrate --yes") 478var result = command.Parse("update --apphost apphost.ts"); 537var result = command.Parse("update --apphost apphost.ts"); 592var result = command.Parse("update --apphost apphost.ts"); 669var result = command.Parse("update --apphost AppHost.csproj --channel stable"); 748var result = command.Parse("update --apphost AppHost.csproj --channel stable"); 825var result = command.Parse("update --apphost AppHost.csproj --channel stable"); 868var result = command.Parse("update --apphost AppHost.csproj"); 911var result = command.Parse("update --apphost AppHost.csproj --yes"); 985var result = command.Parse("update --apphost AppHost.csproj --channel pr-12658"); 1058var result = command.Parse("update --apphost AppHost.csproj --channel pr-12658"); 1092var result = command.Parse("update --apphost AppHost.csproj --migrate --yes"); 1128var result = command.Parse("update --apphost AppHost.csproj --migrate"); 1155var result = command.Parse("update --apphost AppHost.csproj --migrate --yes"); 1230var result = command.Parse("update --self"); 1262var result = command.Parse("update --self"); 1297var result = command.Parse("update --self"); 1421var result = command.Parse(commandLine); 1452var result = command.Parse("update --self"); 1490var result = command.Parse("update"); 1534var result = command.Parse("update --self --channel daily"); 1570var result = command.Parse("update --self --channel staging"); 1614var result = command.Parse("update --self --channel staging"); 1659var result = command.Parse("update --self --quality daily"); 1700var result = command.Parse("update --self --channel daily"); 1763var result = command.Parse("update --channel daily"); 1828var result = command.Parse("update --quality daily"); 1882var result = command.Parse("update --quality invalid"); 1949var result = command.Parse("update --channel stable --quality daily"); 2013var result = command.Parse("update"); 2075var result = command.Parse("update"); 2233var result = command.Parse("update"); 2293var result = command.Parse("update --channel staging"); 2527var result = command.Parse("update"); 2601var result = command.Parse("update"); 2686var result = command.Parse("update"); 2739var result = command.Parse($"update --apphost \"{appHostFile.FullName}\""); 3077var result = command.Parse(updateArgs); 3115var result = command.Parse("update --self"); 3156var result = command.Parse("update --self"); 3201var result = command.Parse("update --self"); 3246var result = command.Parse("update --self"); 3280var result = command.Parse("update --self --channel stable"); 3346var result = command.Parse("update --yes --channel stable --non-interactive"); 3466var result = command.Parse(updateArgs); 3632var result = command.Parse(commandLine);
Commands\WaitCommandTests.cs (15)
26var result = command.Parse("wait --help"); 41var result = command.Parse("wait"); 56var result = command.Parse("wait myresource --help"); 70var result = command.Parse("wait myresource --apphost /path/to/project.csproj --help"); 84var result = command.Parse("wait myresource --status up --help"); 98var result = command.Parse("wait myresource --timeout 60 --help"); 115var result = command.Parse($"wait myresource --status {status} --help"); 132var result = command.Parse($"wait myresource --status {status} --help"); 164var result = command.Parse("wait nonexistent --timeout 5"); 206var result = command.Parse("wait myapp --status up --timeout 5"); 242var result = command.Parse("wait mydb --status healthy --timeout 5"); 274var result = command.Parse("wait mydb --status healthy --timeout 2"); 310var result = command.Parse("wait worker --status down --timeout 5"); 342var result = command.Parse("wait myapp --status up --timeout 5"); 384var result = command.Parse("wait myapp --status down --timeout 5");
Interaction\ConsoleInteractionServiceTests.cs (23)
1372var parseResult = command.Parse("--value bad-value"); 1435var parseResult = command.Parse(""); 1465var parseResult = command.Parse(""); 1482var parseResult = command.Parse(""); 1564var parseResult = command.Parse(""); 1576var parseResult = command.Parse(""); 1592var parseResult = command.Parse(""); 1622var parseResult = command.Parse("--choice invalid"); 1644var parseResult = command.Parse("--items invalid"); 1671var parseResult = command.Parse("--items invalid"); 1697var parseResult = command.Parse("--items invalid"); 1729var parseResult = command.Parse("--items invalid"); 1755var parseResult = command.Parse(""); 1773var parseResult = command.Parse("--choice option1"); 1791var parseResult = command.Parse("--items alpha,gamma"); 1806var parseResult = command.Parse("--yes"); 1818var parseResult = command.Parse("--include"); 1880var parseResult = command.Parse(""); 1897var parseResult = command.Parse("--choice option1"); 1916var parseResult = command.Parse("--items alpha,gamma"); 1935var parseResult = command.Parse(""); 1954var parseResult = command.Parse(""); 1971var binding = PromptBinding.Create(command.Parse(""), option, "copilot,claude,opencode");
NuGet\NuGetPackagePrefetcherTests.cs (4)
57command.SelectForExecution(command.Parse("ls")); 77command.SelectForExecution(command.Parse("ls")); 293var parseResult = newCommand.Parse(commandLine); 514command.SelectForExecution(parseResult ?? command.Parse(commandLine));
Templating\JavaStarterScaffoldTests.cs (1)
147var parseResult = newCommand.Parse(
dotnet-aot (1)
parent\dotnet\Parser.cs (1)
364public 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)
94var exitCode = await command.Parse("--help").InvokeAsync(new InvocationConfiguration { Output = help, Error = errors });
Microsoft.TemplateEngine.Cli (1)
Commands\create\InstantiateCommand.TabCompletion.cs (1)
67ParseResult parseResult = parser.Parse(context.CommandLineText, ParserFactory.ParserConfiguration);
System.CommandLine (1)
Completions\CompletionAction.cs (1)
29var completionParseResult = parseResult.RootCommandResult.Command.Parse(commandLineToComplete, parseResult.Configuration);