Forge
csharpdeeb25a2
1using CascadeIDE.Features.Chat;
2using CascadeIDE.Services;
3using Xunit;
4
5namespace CascadeIDE.Tests;
6
7public sealed class ChatSlashSolutionNewParserTests
8{
9 [Fact]
10 public void TryResolveInput_solution_new_console_with_name()
11 {
12 Assert.True(SlashLineResolver.TryResolveSlashLine("/solution new console MyApp", out var line));
13 Assert.Equal("/solution new console", line.CanonicalPath);
14 Assert.Equal("MyApp", line.ArgTail);
15 }
16
17 [Fact]
18 public void TryResolve_solution_new_console_maps_to_create_project()
19 {
20 ChatSlashCatalogTestSupport.AssertResolves(
21 "/solution new console App1",
22 "/solution new console",
23 "App1");
24 Assert.True(
25 ChatSlashCommandCatalog.TryResolveInput(
26 "/solution new console App1",
27 out var descriptor,
28 out _));
29 Assert.Equal(IdeCommands.CreateProjectInSolution, descriptor.CommandId);
30 }
31}
32
View only · write via MCP/CIDE