941 references to Parse
Aspire.Cli.Tests (936)
CliBootstrapTests.cs (2)
230var parseResult = command.Parse(commandLine); 251var parseResult = command.Parse("ls");
Commands\AddCommandTests.cs (63)
31var result = command.Parse("add --help"); 45var result = command.Parse("integration add --help"); 74var result = command.Parse("integration search redis --json"); 105var result = command.Parse("integration search --format json"); 181var result = command.Parse("integration list --format json"); 224var result = command.Parse(commandLine); 249var result = command.Parse("integration list"); 299var result = command.Parse("integration search redis --format json"); 345var result = command.Parse("integration search rdis --format json"); 432var result = command.Parse($"integration search redis --apphost \"{appHostFile.FullName}\" --format json"); 504var result = command.Parse($"integration search redis --apphost \"{appHostFile.FullName}\" --format json"); 591var result = command.Parse($"integration search foundry --apphost \"{appHostFile.FullName}\" --format json"); 686var result = command.Parse($"integration search redis --apphost \"{appHostFile.FullName}\" --format json"); 748var result = command.Parse($"integration search redis --apphost \"{appHostFile.FullName}\" --format json"); 797var result = command.Parse($"integration search redis --apphost \"{appHostFile.FullName}\" --format json"); 880var result = command.Parse($"integration search foundry --apphost \"{appHostFile.FullName}\" --format json"); 938var result = command.Parse("integration list --format json"); 991var result = command.Parse("integration search azure --format json"); 1061var result = command.Parse("add"); 1136var result = command.Parse("add docker"); 1219var result = command.Parse("add docker --version 9.2.0"); 1299var result = command.Parse("add docker --version 9.2.0"); 1374var result = command.Parse("add redis --version 13.2.0"); 1459var result = command.Parse("add redis --version 13.2.0"); 1530var result = command.Parse($"add {integrationName}"); 1604var result = command.Parse("add redis --version 13.2.0"); 1679var result = command.Parse("add --version 13.2.0"); 1750var result = command.Parse("add --version 13.2.0"); 1820var result = command.Parse("add redis --version 13.2.0"); 1897var result = command.Parse("add redis --version 13.2.0"); 1981var result = command.Parse("add red"); 2051var result = command.Parse($"add redis --source {expectedSource}"); 2086var result = command.Parse("add"); 2161var result = command.Parse("add nonexistentpackage"); 2569var result = command.Parse($"add {packageId} --apphost \"{appHostFile.FullName}\""); 2641var result = command.Parse($"add Aspire.Hosting.Azure.Storage --apphost \"{appHostFile.FullName}\""); 2699var result = command.Parse("add redis"); 2767var result = command.Parse("add redis"); 2932var result = command.Parse("add redis"); 2995var result = command.Parse("add redis"); 3045var result = command.Parse($"add Aspire.Hosting.Foo --apphost \"{appHostFile.FullName}\""); 3095var result = command.Parse($"add Aspire.Hosting.Redis --apphost \"{appHostFile.FullName}\""); 3145var result = command.Parse($"add Aspire.Hosting.Foo --all --apphost \"{appHostFile.FullName}\""); 3191var result = command.Parse($"integration list --apphost \"{appHostFile.FullName}\" --format json"); 3239var result = command.Parse($"integration list --apphost \"{appHostFile.FullName}\""); 3286var result = command.Parse($"integration list --apphost \"{appHostFile.FullName}\""); 3335var result = command.Parse($"integration search zzznomatch --apphost \"{appHostFile.FullName}\""); 3393var result = command.Parse($"add Aspire.Hosting.Foo --apphost \"{appHostFile.FullName}\""); 3447var result = command.Parse($"add Aspire.Hosting.Redis --apphost \"{appHostFile.FullName}\""); 3493var result = command.Parse($"integration list --apphost \"{appHostFile.FullName}\" --format json"); 3659var result = command.Parse("add postgre"); 3726var result = command.Parse("add kube"); 3779var result = command.Parse("add kubernetes"); 3836var result = command.Parse("add kube"); 3901var result = command.Parse("add zzzzzzzzzz"); 3955var result = command.Parse("add postgre --version 9.2.0"); 4007var result = command.Parse("add nonexistentpackage --version 9.2.0"); 4093var result = command.Parse("add sql"); 4174var result = command.Parse("add sql --version 13.2.0"); 4257var result = command.Parse("add sql --version 13.2.0"); 4345var result = command.Parse("add nonexistentpackage --version 13.2.0"); 4432var result = command.Parse("add nonexistentpackage --version 13.2.0"); 4509var result = command.Parse("add azureapp");
Commands\AgentInitCommandTests.cs (25)
45var result = command.Parse("agent init"); 78var result = command.Parse("agent init"); 122var result = command.Parse("agent init"); 144var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations all --skills all"); 203var result = command.Parse("agent init"); 249var result = command.Parse("agent init"); 313var result = command.Parse("agent init"); 360var result = command.Parse("agent init"); 379var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations all --skills {FakeAspireSkillsInstaller.AspireMonitoringSkillName}"); 407var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations all --skills PLAYWRIGHT-CLI"); 450var result = command.Parse("agent init"); 468var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations none --skills all"); 488var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skills none"); 504var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations all"); 551var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations all --skills {skillsArg}"); 574var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations all --skills {FakeAspireSkillsInstaller.AspireOrchestrationSkillName}"); 594var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations invalid --skills all"); 610var result = command.Parse("agent init"); 642var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations all"); 763var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations all --skills none"); 784var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations all --skills none"); 800var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations none --skills all"); 820var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations standard --skills {CommonAgentApplicators.AspireSkillName}"); 912var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations none --skills none"); 943var result = command.Parse($"agent init --workspace-root {workspace.WorkspaceRoot.FullName} --skill-locations none --skills none");
Commands\AgentMcpCommandTests.cs (2)
76var parseResult = rootCommand.Parse(commandLine); 579var parseResult = rootCommand.Parse("agent mcp --dashboard-url not-a-url");
Commands\AgentTelemetryCommandTests.cs (7)
30var 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"); 62var result = command.Parse("agent telemetry --event-type tool_invocation --tool-name aspire-list_resources"); 93var result = command.Parse($"agent telemetry --event-type reference_file_read --file-reference {longValue}"); 151var result = command.Parse("agent telemetry --event-type not_a_real_event --skill-name aspire"); 198var result = command.Parse("agent telemetry --event-type skill_invocation --some-future-flag value"); 213var result = command.Parse("agent telemetry"); 245var 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 (23)
42var result = command.Parse(args); 68var result = command.Parse("integration list --format json"); 89var result = command.Parse("stop"); 115var result = command.Parse("stop"); 139var result = command.Parse("stop"); 160var result = command.Parse("test"); 217var result = command.Parse(args); 243var result = command.Parse("run"); 280var result = command.Parse("run"); 316var result = command.Parse("add SomePackage"); 351var result = command.Parse("run"); 374var result = command.Parse("ps"); 403var result = command.Parse("ps"); 456var result = command.Parse("run"); 495var result = command.Parse("run"); 531var result = command.Parse(args); 559var result = command.Parse("run --apphost somepath"); 587var result = command.Parse($"run {optionName}={value}"); 633var result = command.Parse("run --custom-arg value"); 659var result = command.Parse("run -- --AppHost somepath"); 680var result = command.Parse("run --AppHost foo -- --AppHost bar"); 699var result = command.Parse("add --AppHost somepath"); 720var 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 (48)
88var result = command.Parse("config"); 102var result = command.Parse("config"); 116var result = command.Parse("config set foo bar"); 140var setLlmsResult = command.Parse("config set docs.llmsTxtUrl http://localhost:4321/llms-small.txt"); 144var setSitemapResult = command.Parse("config set docs.api.sitemapUrl http://localhost:4321/sitemap-0.xml"); 176var result = command.Parse("config set foo.bar baz"); 201var result = command.Parse("config set foo.bar.baz hello"); 231var result1 = command.Parse("config set foo primitive"); 236var result2 = command.Parse("config set foo.bar nested"); 261var setResult = command1.Parse("config set testkey testvalue"); 272var getResult = command2.Parse("config get testkey"); 287var setResult = command1.Parse("config set level1.level2.level3 nestedvalue"); 297var getResult = command2.Parse("config get level1.level2.level3"); 310var result = command.Parse("config get nonexistent.key"); 326var setResult = command.Parse("config set deletekey deletevalue"); 331var deleteResult = command.Parse("config delete deletekey"); 336var getResult = command.Parse("config get deletekey"); 351var setResult = command.Parse("config set deep.nested.value test"); 356var deleteResult = command.Parse("config delete deep.nested.value"); 380var setResult1 = command.Parse("config set flatkey flatvalue"); 384var setResult2 = command.Parse("config set nested.key nestedvalue"); 388var setResult3 = command.Parse("config set deep.nested.key deepvalue"); 393var listResult = command.Parse("config list"); 412var setResult = command.Parse("config set testkey testvalue"); 416var listResult = command.Parse("config list"); 438var setResult = command.Parse("config set testkey testvalue"); 442var listResult = command.Parse("config list --all"); 464var listResult = command.Parse("config list"); 486var listResult = command.Parse("config list --all"); 507var listResult = command.Parse("config list --all"); 531var infoResult = command.Parse("config info --json"); 576var setResult = command.Parse($"config set {KnownFeatures.FeaturePrefix}.testFeature true"); 594var setResult = command.Parse($"config set {KnownFeatures.FeaturePrefix}.testFeature false"); 618var setResult = command.Parse($"config set {KnownFeatures.FeaturePrefix}.testFeature invalid"); 651var setResult = command.Parse($"config set {KnownFeatures.FeaturePrefix}.{KnownFeatures.ShowDeprecatedPackages} true"); 684var result = command.Parse("config set features:polyglotSupportEnabled true"); 712var result1 = command.Parse("config set features:polyglotSupportEnabled true"); 717var result2 = command.Parse("config set features.polyglotSupportEnabled false"); 743var result1 = command.Parse("config set features.polyglotSupportEnabled true"); 748var result2 = command.Parse("config set features:polyglotSupportEnabled false"); 774var setResult = command.Parse("config set features.polyglotSupportEnabled true"); 779var deleteResult = command.Parse("config delete features:polyglotSupportEnabled"); 867var result = command.Parse($"config set {key} AppHost.csproj"); 897var result = command.Parse($"config set {key} AppHost.csproj"); 929var result = command.Parse($"config set {key} AppHost.csproj --global"); 954var result = command.Parse($"config set -g overrideStagingFeed {stagingFeed}"); 994var result = command.Parse("config set appHostPath AppHost.csproj"); 1012var result = command.Parse("config set appHost.language typescript/nodejs");
Commands\DashboardRunCommandTests.cs (16)
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"); 163var result = command.Parse("dashboard run"); 196var result = command.Parse("dashboard run"); 220var result = command.Parse("dashboard run"); 253var result = command.Parse($"dashboard run {cliArgs}"); 273var result = command.Parse("dashboard run"); 297var result = command.Parse("dashboard run"); 317var result = command.Parse("dashboard run --CUSTOM_SETTING=myvalue"); 343var 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"); 372var result = command.Parse("dashboard run"); 403var result = command.Parse("dashboard run"); 460var result = command.Parse("dashboard run");
Commands\DeployCommandTests.cs (10)
29var result = command.Parse("deploy --help"); 59var result = command.Parse("deploy"); 125var result = command.Parse(invocation); 177var result = command.Parse("deploy --apphost invalid.csproj"); 211var result = command.Parse("deploy --apphost valid.csproj"); 245var result = command.Parse("deploy --apphost valid.csproj"); 313var result = command.Parse("deploy"); 385var result = command.Parse("deploy"); 456var result = command.Parse($"deploy --output-path {testOutputPath}"); 516var result = command.Parse("deploy");
Commands\DescribeCommandTests.cs (29)
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");
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 (44)
102var parseResult = initCommand.Parse("init"); 145var parseResult = initCommand.Parse("init"); 162var parseResult = initCommand.Parse("init"); 188var parseResult = initCommand.Parse("init"); 269var parseResult = initCommand.Parse("init"); 320var parseResult = initCommand.Parse("init"); 358var parseResult = initCommand.Parse("init --source https://example.test/v3/index.json --version 13.0.0 --channel daily --suppress-agent-init"); 393var parseResult = initCommand.Parse("init"); 423var parseResult = initCommand.Parse("init --language typescript"); 471var parseResult = initCommand.Parse("init --language typescript"); 518var parseResult = initCommand.Parse("init --language typescript"); 566var parseResult = initCommand.Parse("init --language typescript"); 583var parseResult = command.Parse("init --non-interactive --skills none"); 605var parseResult = command.Parse("init --non-interactive --skill-locations none"); 625var parseResult = command.Parse($"init --non-interactive --skill-locations standard --skills {CommonAgentApplicators.AspireSkillName}"); 648var parseResult = initCommand.Parse("init"); 683var parseResult = initCommand.Parse("init"); 731var parseResult = initCommand.Parse("init"); 773var parseResult = initCommand.Parse("init"); 861var parseResult = initCommand.Parse("init"); 914var parseResult = initCommand.Parse("init"); 969var parseResult = initCommand.Parse("init"); 1018var parseResult = initCommand.Parse("init"); 1054var parseResult = initCommand.Parse("init"); 1089var parseResult = initCommand.Parse("init"); 1125var parseResult = initCommand.Parse("init"); 1167var parseResult = initCommand.Parse("init"); 1198var parseResult = initCommand.Parse("init"); 1242var parseResult = initCommand.Parse("init"); 1294var parseResult = initCommand.Parse("init"); 1342var parseResult = initCommand.Parse("init"); 1396var parseResult = initCommand.Parse("init"); 1448var parseResult = initCommand.Parse("init"); 1518var parseResult = initCommand.Parse("init"); 1603var parseResult = initCommand.Parse("init"); 1671var parseResult = initCommand.Parse("init"); 1721var parseResult = initCommand.Parse("init"); 1767var parseResult = initCommand.Parse("init"); 1804var parseResult = initCommand.Parse("init"); 1853var parseResult = initCommand.Parse("init"); 1915var parseResult = initCommand.Parse("init"); 1966var parseResult = initCommand.Parse("init"); 2033var parseResult = initCommand.Parse("init"); 2080var 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)
293var parseResult = newCommand.Parse(string.Join(" ", commandArguments)); 400var parseResult = newCommand.Parse(
Commands\NewCommandTests.cs (74)
38var result = command.Parse("new --help"); 112var configResult = configCommand.Parse($"config set -g overrideStagingFeed {stagingFeed}"); 141var result = command.Parse($"new {KnownTemplateId.CSharpEmptyAppHost} --language csharp --name TemplateOut --output ./TemplateOut --localhost-tld false"); 169var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 193var result = command.Parse($"new aspire-starter --use-redis-cache --test-framework {testFramework}"); 249var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 282var result = command.Parse("new aspire-starter --name MyApp --output ./output --use-redis-cache --test-framework None"); 314var result = command.Parse("new aspire-starter --output notsrc --use-redis-cache --test-framework None"); 392var result = command.Parse("new aspire-starter --channel stable --use-redis-cache --test-framework None"); 469var result = command.Parse("new aspire-starter --channel stable --use-redis-cache --test-framework None"); 546var result = command.Parse("new aspire-starter --channel pr-12345 --name TestApp --output ./output --use-redis-cache --test-framework None"); 585var result = command.Parse("new aspire-starter --name MyApp --output ./output --use-redis-cache --test-framework None"); 617var result = command.Parse("new aspire-starter --name MyApp --output ./output --use-redis-cache --test-framework None --version 9.2.0"); 649var result = command.Parse("new"); 690var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 801var result = command.Parse("new aspire-starter --name TestApp --output ./output"); 864var result = command.Parse($"new aspire-starter --use-redis-cache --test-framework None"); 923var result = command.Parse("new --name TestApp --output ./output"); 993var result = command.Parse("new --name TestApp --output ./output"); 1028var result = command.Parse("new aspire-empty --name TestApp --output ./output"); 1089var result = command.Parse("new aspire-empty --name TestApp --output ./output"); 1152var result = command.Parse("new aspire-empty --name TestApp --output ./output"); 1180var result = command.Parse("new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init"); 1243var result = command.Parse($"new aspire-empty --name TestApp --output ./output --language csharp --localhost-tld false --suppress-agent-init --channel staging --source {sourceOverride}"); 1288var result = command.Parse("new aspire-empty --name TestApp --output ./output --language csharp --localhost-tld false --suppress-agent-init --channel staging --source relative-feed"); 1337var result = command.Parse($"new aspire-empty --name TestApp --output ./output --language {language} --localhost-tld false --suppress-agent-init --source \"{sourceOverride}\""); 1361var result = command.Parse($"new aspire-empty --name TestApp --output ./output --language csharp --localhost-tld false --suppress-agent-init --source \"{sourceOverride}\""); 1395var result = command.Parse($"new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init --source {sourceOverride}"); 1429var result = command.Parse("new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init --source nuget.org"); 1463var result = command.Parse("new aspire-empty --name TestApp --output ./output --language typescript --localhost-tld false --suppress-agent-init"); 1502var result = command.Parse("new aspire-java-empty --name TestApp --output ./output --localhost-tld false"); 1538var result = command.Parse("new aspire-py-empty --name TestApp --output ./output --localhost-tld false"); 1555var result = command.Parse("new aspire-empty --name TestApp --output ./output --localhost-tld false"); 1584var result = command.Parse("new aspire-empty --name TestApp --output ./output --localhost-tld false --suppress-agent-init"); 1609var result = command.Parse("new aspire-empty --name TestApp --output ./output --localhost-tld false --suppress-agent-init"); 1643var result = command.Parse("new aspire-empty --name TestApp --output ./output --localhost-tld --suppress-agent-init"); 1717var result = command.Parse("new aspire-empty --name TestApp --output ./output"); 1758var result = command.Parse("new aspire-ts-empty --name TestApp --output ./output --localhost-tld false"); 1806var result = command.Parse("new aspire-ts-empty --name TestApp --output ./output --channel stable --localhost-tld false"); 1847var result = command.Parse("new aspire-ts-empty --name TestApp --localhost-tld false"); 1925var result = command.Parse("new aspire-ts-empty --name TestApp --output ./output"); 2004var result = command.Parse("new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false"); 2069var result = command.Parse("new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false"); 2128var result = command.Parse($"new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false --source \"{sourceOverride}\""); 2177var result = command.Parse($"new aspire-starter --name TestApp --output ./output --source {sourceOverride} --use-redis-cache --test-framework None"); 2233var result = command.Parse($"new aspire-ts-starter --name TestApp --output ./output --channel daily --localhost-tld false --source {sourceOverride}"); 2261var result = command.Parse("new aspire-empty --name TestApp --output ./output"); 2286var result = command.Parse("new aspire-empty --name TestApp --output ./output --skill-locations none"); 2311var result = command.Parse($"new aspire-empty --name TestApp --output ./output --skill-locations standard --skills {CommonAgentApplicators.AspireSkillName}"); 2359var result = command.Parse("new"); 2405var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 2448var result = command.Parse($"new aspire-starter --name MyProject --output {Path.Combine(workspace.WorkspaceRoot.FullName, "my-project")} --use-redis-cache --test-framework None"); 2491var result = command.Parse($"new aspire-starter --name MyProject --output {outputDir} --use-redis-cache --test-framework None --suppress-agent-init"); 2538var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 2577var result = command.Parse("new aspire-ts-empty --name TestApp --output ./output"); 2632var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 2691var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 2748var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 2810var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 2872var result = command.Parse($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false"); 2935var result = command.Parse($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false"); 3013var result = command.Parse( 3088var result = command.Parse($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false"); 3157var result = command.Parse($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false"); 3211var result = command.Parse($"new {KnownTemplateId.TypeScriptEmptyAppHost} --name {projectName} --version 9.2.0 --localhost-tld false"); 3237var result = command.Parse("new aspire-empty --name TestApp --output ./output --suppress-agent-init"); 3263var result = command.Parse("new aspire-empty --name TestApp --output ./output --suppress-agent-init=false"); 3291var result = command.Parse("new aspire-empty --name TestApp --output ./output"); 3325var result = command.Parse($"new aspire-starter --name TestApp --output {existingDir.FullName} --use-redis-cache --test-framework None"); 3347var result = command.Parse($"new aspire-starter --name TestApp --output {emptyDir.FullName} --use-redis-cache --test-framework None"); 3382var result = command.Parse("new aspire-starter --use-redis-cache --test-framework None"); 3407var result = command.Parse($"new aspire-starter --name TestApp --output {invalidPath} --use-redis-cache --test-framework None"); 3453var result = command.Parse("new aspire-starter --name TestApp --output . --use-redis-cache --test-framework None"); 3512var 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 (21)
40var result = command.Parse("ps --help"); 55var result = command.Parse("ps"); 74var result = command.Parse($"ps --format {format}"); 92var result = command.Parse($"ps --format {format}"); 107var result = command.Parse("ps --format invalid"); 157var result = command.Parse("ps --format json"); 209var result = command.Parse("ps --format json"); 247var result = command.Parse("ps --format json"); 293var result = command.Parse("ps --format json"); 335var result = command.Parse("ps --format json"); 381var result = command.Parse("ps"); 414var result = command.Parse("ps"); 455var result = command.Parse("ps"); 478var result = command.Parse("ps --format json"); 514var result = command.Parse("ps --format json"); 554var result = command.Parse("ps --format json --follow"); 571var result = command.Parse("ps --follow"); 619var result = command.Parse("ps --format json --follow"); 663var result = command.Parse("ps --format json"); 710var result = command.Parse("ps --format json"); 749var 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 (72)
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"""); 231var result = command.Parse($"""resource web --apphost "{appHostProjectFile.FullName}" --help"""); 261var result = command.Parse("resource hidden-worker --include-hidden --help"); 277var result = command.Parse("resource"); 296var result = command.Parse($"""resource {arguments}"""); 313var result = command.Parse("resource myresource"); 333var result = command.Parse($"""resource myresource {arguments}"""); 350var result = command.Parse("resource myresource my-command --help"); 364var result = command.Parse("resource myresource my-command --apphost /path/to/project.csproj --help"); 386var result = command.Parse($"resource myresource {commandName} --help"); 418var result = command.Parse($"resource myresource {commandName}"); 457var result = command.Parse("resource myresource my-command"); 482var result = command.Parse("resource myresource start --apphost /path/to/project.csproj --help"); 505var result = command.Parse("resource myresource Start"); 542var result = command.Parse("""resource web-browser-automation fill-browser "#name" Aspire"""); 569var result = command.Parse("""resource web-browser-automation click-browser"""); 606var result = command.Parse("""resource web-browser-automation wait-for-browser "--text=Submitted Aspire!" --timeoutMilliseconds=500"""); 644var result = command.Parse("resource mydb configure -- --AppHost primary"); 679var result = command.Parse("resource greeting parameter-set --value \"Hello world\""); 739var result = command.Parse("""resource web-browser-automation navigate-browser "https://example.com/?q=aspire" """); 766var result = command.Parse("""resource web-browser-automation click-browser "#submit" extra"""); 793var result = command.Parse("""resource web-browser-automation click-browser --selector "#submit" --count 2"""); 820var result = command.Parse("""resource web-browser-automation configure --verbose"""); 840var result = command.Parse("""resource web-browser-automation configure -- --selector "#submit" """); 876var result = command.Parse("""resource web-browser-automation wait-for-browser --timeout-milliseconds 500"""); 904var result = command.Parse("""resource web-browser-automation Configure --message hello"""); 940var result = command.Parse("""resource web-browser-automation configure --timeout-milliseconds=500 --proxy"""); 971var result = command.Parse($"""resource web-browser-automation configure {arguments}"""); 1006var result = command.Parse("""resource web-browser-automation configure --flavor chocolate"""); 1042var result = command.Parse("""resource web-browser-automation configure --flavor strawberry"""); 1072var result = command.Parse("""resource web-browser-automation configure --unknown value"""); 1098var result = command.Parse("""resource web-browser-automation configure --mm ss"""); 1125var result = command.Parse("""resource web-browser-automation configure --proxy maybe"""); 1154var result = command.Parse("""resource web-browser-automation configure --save-to-user-secrets true"""); 1194var result = command.Parse("""resource web-browser-automation configure --timeout-seconds 0"""); 1229var result = command.Parse("resource myresource my-command"); 1262var result = command.Parse("""resource web configure"""); 1298var result = command.Parse("""resource web-browser-automation configure --flavor strawberry"""); 1328var result = command.Parse("""resource web-browser-automation configure"""); 1361var result = command.Parse($"""resource web-browser-automation configure {arguments}"""); 1390var result = command.Parse("""resource web-browser-automation configure --timeoutMilliseconds 1 --timeout-milliseconds 2"""); 1419var result = command.Parse("""resource web-browser-automation configure --message first --message second"""); 1449var result = command.Parse("""resource web-browser-automation wait-for-browser --timeout-milliseconds 500"""); 1481var result = command.Parse("""resource web-browser-automation wait-for-browser"""); 1519var result = command.Parse("""resource web-browser-automation wait-for-browser --timeout-milliseconds not-a-number"""); 1555var result = command.Parse("""resource web-browser-automation fill-browser --selector "#name" Aspire"""); 1590var result = command.Parse("""resource web-browser-automation configure -- --log-level Debug"""); 1619var result = command.Parse("""resource web-browser-automation configure -- --message "from delimiter" --timeout-milliseconds 10"""); 1648var result = command.Parse("resource hidden-worker configure --include-hidden -- --message \"from hidden resource\""); 1677var result = command.Parse("""resource web-browser-automation configure --log-level Debug"""); 1712var result = command.Parse("""resource web-browser-automation configure --no-proxy localhost"""); 1756var result = command.Parse("""resource web-browser-automation configure --load-arguments -- --browser Chrome"""); 1800var result = command.Parse("""resource web-browser-automation configure --load-arguments -- --browser Chrome"""); 1836var result = command.Parse("""resource web-browser-automation configure --load-arguments -- --browser Chrome"""); 1875var result = command.Parse("""resource argument-commands dependent-arguments --load-arguments -- --category fruit"""); 1909var result = command.Parse("""resource argument-commands dependent-arguments -- --category=fruit --item=banana --quantity=2 --priority=express"""); 1949var result = command.Parse("""resource web-browser-automation configure --no-proxy"""); 1966var result = command.Parse("""resource myresource --help"""); 2005var result = command.Parse("""resource web-browser-automation wait-for-browser --help"""); 2039var result = command.Parse("""resource web-browser-automation wait-for-browser --help -- --selector #main"""); 2069var result = command.Parse("""resource web-browser-automation custom-command -- --help"""); 2107var result = command.Parse("""resource web-browser-automation configure --help"""); 2137var result = command.Parse("""resource web-browser-automation configure --help"""); 2174var result = command.Parse("""resource web-browser-automation configure --help"""); 2195var result = command.Parse("""resource web-browser-automation configure --help"""); 2221var result = command.Parse("""resource web-browser-automation configure --help"""); 2272var result = command.Parse("""resource argument-commands all-argument-types --help""");
Commands\RestoreCommandTests.cs (2)
39var result = command.Parse($"restore --apphost {appHostFile.FullName}"); 74var 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 (57)
50var result = command.Parse("run --help"); 296var result = command.Parse("run"); 351var result = command.Parse("run"); 405var result = command.Parse($"run --apphost {appHostFile.FullName}"); 487var result = command.Parse($"run --apphost {appHostFile.FullName}"); 588var result = command.Parse($"run --apphost {appHostFile.FullName}"); 686var result = command.Parse($"run --apphost {appHostFile.FullName}"); 753var result = command.Parse("run"); 774var result = command.Parse("run"); 804var result = command.Parse("run"); 822var result = command.Parse("run"); 839var result = command.Parse("run --apphost /tmp/doesnotexist.csproj"); 903var result = command.Parse($"run --apphost {appHostProjectFile.FullName}"); 933var result = command.Parse("run"); 963var result = command.Parse("run"); 992var result = command.Parse($"run --apphost {appHostProjectFile.FullName}"); 1052var result = command.Parse($"run --apphost {appHostProjectFile.FullName}"); 1075var result = command.Parse("run --detach"); 1105var parentResult = parentCommand.Parse($"run --detach --apphost {appHostFile.FullName}"); 1144var childResult = childCommand.Parse("run"); 1220var result = command.Parse("run"); 1326var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1396var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1464var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1521var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1578var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1641var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1708var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1769var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1821var result = command.Parse($"run --apphost {appHostFile.FullName}"); 1893var result = command.Parse($"run --apphost {appHostFile.FullName}"); 2050var result = command.Parse("run"); 2122var result = command.Parse("run"); 2180var result = command.Parse("run"); 2228var result = command.Parse("run --capture-profile"); 2271var result = command.Parse("run --capture-profile"); 2322var result = command.Parse("run --capture-profile"); 2373var result = command.Parse("run"); 2484var result = command.Parse("run"); 2590var result = command.Parse("run"); 2660var result = command.Parse("run"); 2729var result = command.Parse("run --start-debug-session"); 2789var result = command.Parse("run"); 2853var result = command.Parse("run"); 2920var result = command.Parse("run"); 2979var result = command.Parse("run"); 3034var result = command.Parse("run"); 3091var result = command.Parse("run"); 3150var result = command.Parse("run"); 3557var result = command.Parse("run --no-build"); 3638var result = command.Parse("run --isolated"); 3699var result = command.Parse("run --no-build"); 3715var result = command.Parse("run -- --custom-arg value --launch-profile E2E"); 4344var result = command.Parse(explicitAppHost ? $"run --apphost \"{appHostFile.FullName}\"" : "run"); 4565var result = command.Parse("run --non-interactive"); 4638var result = command.Parse("run --no-build"); 4693var 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)
31var result = command.Parse("sdk dump --help"); 53var result = command.Parse($"sdk dump --format {format}"); 66var result = command.Parse("sdk dump /nonexistent/path/to/integration.csproj"); 81var result = command.Parse("sdk dump @13.2.0"); 96var result = command.Parse("sdk dump Aspire.Hosting.Redis@"); 111var result = command.Parse("sdk dump Aspire.Hosting.Redis@not-a-version!!!"); 126var result = command.Parse("sdk dump some-random-string"); 141var result = command.Parse("sdk dump Aspire.Hosting.Redis@13.2.0"); 154var result = command.Parse("sdk dump Aspire.Hosting.Redis@13.2.0 Aspire.Hosting.PostgreSQL@13.2.0"); 167var result = command.Parse("sdk dump --format ci --output-directory ./ats Aspire.Hosting.Redis@13.2.0"); 180var result = command.Parse("sdk dump --format ci --output ./all.ats.txt --output-directory ./ats Aspire.Hosting.Redis@13.2.0"); 195var result = command.Parse("sdk dump --output-directory ./ats Aspire.Hosting.Redis@13.2.0"); 210var result = command.Parse("sdk dump --format ci --output-directory ./ats"); 225var result = command.Parse("sdk dump Aspire.Hosting.Redis@13.2.0-preview.1"); 240var 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 (2)
35var result = command.Parse($"secret path --apphost \"{appHostFile.FullName}\""); 61var result = command.Parse($"secret path --apphost \"{appHostFile.FullName}\"");
Commands\StartCommandTests.cs (28)
33var result = command.Parse("start --help"); 53var result = command.Parse("start --help"); 70var result = command.Parse("start --no-build --help"); 84var result = command.Parse("start --format json --help"); 98var result = command.Parse("start --isolated --help"); 181var result = command.Parse("start"); 199var result = command.Parse("start -- --custom-arg value --launch-profile E2E"); 285var result = command.Parse("start"); 315var result = command.Parse("start --format json"); 360var result = command.Parse($"start --apphost {appHostFile.FullName}"); 476var result = command.Parse("start"); 505var result = command.Parse($"start --apphost {appHostFile.FullName} --start-debug-session"); 530var result = provider.GetRequiredService<RootCommand>().Parse($"start --apphost {appHostFile.FullName}"); 568var result = command.Parse($"start --apphost {appHostFile.FullName}"); 604var result = command.Parse(string.Format(CultureInfo.InvariantCulture, commandTemplate, appHostFile.FullName)); 624Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("start"))); 625Assert.True(AppHostLauncher.ResolveIsolated(command.Parse("start --isolated"))); 626Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("start --isolated false"))); 627Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("run"))); 628Assert.True(AppHostLauncher.ResolveIsolated(command.Parse("run --isolated"))); 629Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("run --isolated false"))); 643Assert.Equal(expected, AppHostLauncher.GetExplicitIsolated(command.Parse(commandLine))); 656Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("start"))); 657Assert.True(AppHostLauncher.ResolveIsolated(command.Parse("start --isolated"))); 658Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("start --isolated false"))); 659Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("run"))); 660Assert.True(AppHostLauncher.ResolveIsolated(command.Parse("run --isolated"))); 661Assert.False(AppHostLauncher.ResolveIsolated(command.Parse("run --isolated false")));
Commands\StopCommandTests.cs (33)
37var result = command.Parse("stop --help"); 52var result = command.Parse("stop myresource"); 73var result = command.Parse("stop --apphost missing-directory"); 104var result = command.Parse($"stop --apphost \"{appHostDirectory.FullName}\""); 138var result = command.Parse("stop --all"); 174var result = command.Parse("stop --all"); 210var result = command.Parse("stop"); 263var result = command.Parse("stop"); 297var result = command.Parse($"stop --apphost \"{appHostFile.FullName}\""); 338var result = command.Parse("stop"); 377var result = command.Parse("stop"); 418var result = command.Parse("stop --all"); 459var result = command.Parse(commandLine); 492var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 526var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 572var result = command.Parse("stop --force"); 610var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 644var result = command.Parse("stop --force"); 683var result = command.Parse("stop --force"); 720var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 757var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 797var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 836var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 880var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 922var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 964var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 1002var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 1040var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 1074var result = command.Parse($"stop --force --apphost \"{appHostFile.FullName}\""); 1111var result = command.Parse("stop --force"); 1149var result = command.Parse("stop --force"); 1169var result = command.Parse("stop --force --all"); 1208var result = command.Parse("stop");
Commands\TelemetryCommandTests.cs (2)
30var result = command.Parse("otel"); 288var result = command.Parse($"otel {otelCommand} --dashboard-url http://localhost:18888");
Commands\TelemetryLogsCommandTests.cs (17)
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"); 316var result = command.Parse("otel logs --dashboard-url not-a-url"); 354var result = command.Parse("otel logs --dashboard-url http://localhost:18888"); 397var result = command.Parse("otel logs --dashboard-url http://localhost:18888"); 436var result = command.Parse("otel logs --dashboard-url http://localhost:18888"); 466var result = command.Parse("otel logs --dashboard-url http://localhost:18888/login?t=sometoken"); 506var result = command.Parse("otel logs --dashboard-url http://localhost:18888"); 562var result = command.Parse("otel logs --dashboard-url http://localhost:18888/login?t=abc123"); 644var result = command.Parse("otel logs --format json --dashboard-url http://localhost:18888"); 710var 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 (17)
24var result = command.Parse("terminal --help"); 40var result = command.Parse("terminal"); 54var result = command.Parse("terminal attach"); 68var result = command.Parse("terminal attach myresource"); 88var result = command.Parse("terminal attach myresource"); 108var result = command.Parse("terminal attach does-not-exist"); 133var result = command.Parse("terminal attach myresource"); 158var result = command.Parse("terminal attach myresource"); 199var result = command.Parse("terminal attach myresource --replica 99"); 238var result = command.Parse("terminal attach myresource"); 284var result = command.Parse("terminal attach myresource"); 301var result = command.Parse("terminal ps"); 324var result = command.Parse("terminal ps"); 347var result = command.Parse("terminal ps"); 393var result = command.Parse("terminal ps"); 427var result = command.Parse("terminal ps --format json"); 549var result = command.Parse("terminal ps --format json --verbose");
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\UpdateCommandTests.cs (51)
39var result = command.Parse("update --help"); 72var result = command.Parse(commandLine); 124var result = command.Parse($"update --apphost {appHostProjectFile.FullName}"); 170var result = command.Parse($"update --apphost AppHost.csproj"); 283var result = command.Parse("update"); 360var result = command.Parse("update --apphost AppHost.csproj"); 422var result = command.Parse("update --apphost apphost.ts"); 481var result = command.Parse("update --apphost apphost.ts"); 536var result = command.Parse("update --apphost apphost.ts"); 613var result = command.Parse("update --apphost AppHost.csproj"); 692var result = command.Parse("update --apphost AppHost.csproj"); 769var result = command.Parse("update --apphost AppHost.csproj"); 812var result = command.Parse("update --apphost AppHost.csproj"); 855var result = command.Parse("update --apphost AppHost.csproj --yes"); 929var result = command.Parse("update --apphost AppHost.csproj"); 1002var result = command.Parse("update --apphost AppHost.csproj"); 1036var result = command.Parse("update --apphost AppHost.csproj --migrate --yes"); 1072var result = command.Parse("update --apphost AppHost.csproj --migrate"); 1099var result = command.Parse("update --apphost AppHost.csproj --migrate --yes"); 1173var result = command.Parse("update --self"); 1205var result = command.Parse("update --self"); 1240var result = command.Parse("update --self"); 1364var result = command.Parse(commandLine); 1395var result = command.Parse("update --self"); 1433var result = command.Parse("update"); 1477var result = command.Parse("update --self --channel daily"); 1513var result = command.Parse("update --self --channel staging"); 1557var result = command.Parse("update --self --channel staging"); 1602var result = command.Parse("update --self --quality daily"); 1643var result = command.Parse("update --self --channel daily"); 1706var result = command.Parse("update --channel daily"); 1771var result = command.Parse("update --quality daily"); 1825var result = command.Parse("update --quality invalid"); 1892var result = command.Parse("update --channel stable --quality daily"); 1952var result = command.Parse("update"); 2014var result = command.Parse("update"); 2168var result = command.Parse("update"); 2228var result = command.Parse("update --channel staging"); 2457var result = command.Parse("update"); 2531var result = command.Parse("update"); 2616var result = command.Parse("update"); 2669var result = command.Parse($"update --apphost \"{appHostFile.FullName}\""); 2890var result = command.Parse(updateArgs); 2928var result = command.Parse("update --self"); 2969var result = command.Parse("update --self"); 3014var result = command.Parse("update --self"); 3059var result = command.Parse("update --self"); 3093var result = command.Parse("update --self --channel stable"); 3159var result = command.Parse("update --yes --channel stable --non-interactive"); 3279var result = command.Parse(updateArgs); 3445var 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 (22)
1327var parseResult = command.Parse("--value bad-value"); 1390var parseResult = command.Parse(""); 1420var parseResult = command.Parse(""); 1437var parseResult = command.Parse(""); 1519var parseResult = command.Parse(""); 1531var parseResult = command.Parse(""); 1547var parseResult = command.Parse(""); 1577var parseResult = command.Parse("--choice invalid"); 1599var parseResult = command.Parse("--items invalid"); 1626var parseResult = command.Parse("--items invalid"); 1652var parseResult = command.Parse("--items invalid"); 1684var parseResult = command.Parse("--items invalid"); 1710var parseResult = command.Parse(""); 1728var parseResult = command.Parse("--choice option1"); 1746var parseResult = command.Parse("--items alpha,gamma"); 1761var parseResult = command.Parse("--yes"); 1773var parseResult = command.Parse("--include"); 1835var parseResult = command.Parse(""); 1852var parseResult = command.Parse("--choice option1"); 1871var parseResult = command.Parse("--items alpha,gamma"); 1890var parseResult = command.Parse(""); 1909var parseResult = command.Parse("");
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)
109var parseResult = newCommand.Parse(
dotnet (1)
Parser.cs (1)
355public static ParseResult Parse(string commandLineUnsplit) => RootCommand.Parse(commandLineUnsplit, ParserConfiguration);
dotnet-aot (1)
src\sdk\src\Cli\dotnet\Parser.cs (1)
355public static ParseResult Parse(string commandLineUnsplit) => RootCommand.Parse(commandLineUnsplit, ParserConfiguration);
dotnet-watch (1)
CommandLine\CommandLineOptions.cs (1)
135.Where(arg => !msbuildCommandDefinition.Parse(arg).HasOption(msbuildCommandDefinition.TargetOption))
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);