csharpdeeb25a2 | 1 | using CascadeIDE.Models; |
| 2 | using CascadeIDE.Services; |
| 3 | using Xunit; |
| 4 | |
| 5 | namespace CascadeIDE.Tests; |
| 6 | |
| 7 | public sealed class SettingsServicePresentationMergeTests |
| 8 | { |
| 9 | [Fact] |
| 10 | public void ApplyPresentationFromDisk_CopiesDisplayScreensTopologyAndGrammar() |
| 11 | { |
| 12 | var target = new CascadeIdeSettings |
| 13 | { |
| 14 | Display = new DisplaySettings |
| 15 | { |
| 16 | Screens = new DisplayScreensSettings |
| 17 | { |
| 18 | Topology = "", |
| 19 | Grammar = new PresentationGrammarSettings(), |
| 20 | }, |
| 21 | }, |
| 22 | }; |
| 23 | var disk = new CascadeIdeSettings |
| 24 | { |
| 25 | Display = new DisplaySettings |
| 26 | { |
| 27 | Screens = new DisplayScreensSettings |
| 28 | { |
| 29 | Topology = "(P+F) (M)", |
| 30 | Grammar = new PresentationGrammarSettings |
| 31 | { |
| 32 | Pfd = "P", |
| 33 | Forward = "F", |
| 34 | Mfd = "M", |
| 35 | }, |
| 36 | }, |
| 37 | }, |
| 38 | }; |
| 39 | |
| 40 | SettingsService.ApplyPresentationFromDisk(target, disk); |
| 41 | |
| 42 | Assert.Equal("(P+F) (M)", target.Display.Screens.Topology); |
| 43 | Assert.Equal("P", target.Display.Screens.Grammar.Pfd); |
| 44 | } |
| 45 | } |
| 46 | |
View only · write via MCP/CIDE