csharpdeeb25a2 | 1 | using CascadeIDE.Features.UiChrome; |
| 2 | using CascadeIDE.Services; |
| 3 | using CascadeIDE.ViewModels; |
| 4 | using Xunit; |
| 5 | |
| 6 | namespace CascadeIDE.Tests; |
| 7 | |
| 8 | public 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