Forge
csharpdeeb25a2
1using CascadeIDE.Features.UiChrome;
2using CascadeIDE.Services;
3using CascadeIDE.ViewModels;
4using Xunit;
5
6namespace CascadeIDE.Tests;
7
8public sealed class MelodyPaletteCatalogFallbackTests
9{
10 [Fact]
11 public void MelodyPaletteCommand_ToRow_Uses_doc_when_command_not_in_palette_catalog()
12 {
13 Assert.DoesNotContain(
14 IdeCommandPaletteCatalog.All,
15 e => e.CommandId == "get_ide_state");
16
17 var line = new MelodyPaletteCommand("test_ws", "get_ide_state");
18 var row = line.ToCommandPaletteRow(HotkeyGestureMap.Load(), UiModeFamily.Balanced);
19 Assert.NotNull(row);
20 Assert.Equal("get_ide_state", row!.CommandId);
21 Assert.Equal("c:test_ws", row.Title);
22 Assert.Contains("сводка", row.Subtitle, StringComparison.OrdinalIgnoreCase);
23 }
24}
25
View only · write via MCP/CIDE