Skip to content
This repository was archived by the owner on Nov 25, 2023. It is now read-only.

Commit 6aece53

Browse files
committed
Fix unit tests + include new jsons
1 parent 541a6ff commit 6aece53

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

src/InvvardDev.EZLayoutDisplay.Desktop/InvvardDev.EZLayoutDisplay.Desktop.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@
227227
<None Include="NLog.config">
228228
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
229229
</None>
230+
<None Include="Properties\layoutDefinition_ergodox.json" />
231+
<None Include="Properties\layoutDefinition_moonlander.json" />
230232
<None Include="Properties\Settings.settings">
231233
<Generator>PublicSettingsSingleFileGenerator</Generator>
232234
<LastGenOutput>Settings.Designer.cs</LastGenOutput>

src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/SettingsViewModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,9 @@ private string GetKeyBoardDescription(string keyboardGeometry, string revisionMo
485485
case "planck-ez":
486486
keyboardDescription = "Planck EZ ";
487487

488+
break;
489+
case "moonlander":
490+
keyboardDescription = "Moonlander Mk1 ";
488491
break;
489492
default:
490493
keyboardDescription = $"{keyboardGeometry} ";

src/InvvardDev.EZLayoutDisplay.Tests/ViewModel/DisplayLayoutViewModelTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void LoadCompleteLayout(int numberOfKey, int numberOfLayer, bool noLayout
142142

143143
var mockWindowService = new Mock<IWindowService>();
144144
var mockLayoutService = new Mock<ILayoutService>();
145-
mockLayoutService.Setup(l => l.GetLayoutTemplate("")).ReturnsAsync(layoutTemplate).Verifiable();
145+
mockLayoutService.Setup(l => l.GetLayoutTemplate(null)).ReturnsAsync(layoutTemplate).Verifiable();
146146
var mockSettingsService = new Mock<ISettingsService>();
147147
mockSettingsService.SetupProperty(s => s.EZLayout, keyboardLayout);
148148

@@ -151,7 +151,7 @@ public void LoadCompleteLayout(int numberOfKey, int numberOfLayer, bool noLayout
151151

152152
//Assert
153153
Assert.Equal(noLayoutAvailable, displayLayoutViewModel.NoLayoutAvailable);
154-
mockLayoutService.Verify(l => l.GetLayoutTemplate(""), Times.AtMost(numberOfLayer));
154+
mockLayoutService.Verify(l => l.GetLayoutTemplate(null), Times.AtMost(numberOfLayer));
155155
Assert.Equal(numberOfKey, displayLayoutViewModel.CurrentLayoutTemplate.Count);
156156
}
157157

@@ -171,7 +171,7 @@ public void NextLayerCommand_CanExecute(int layerNumber, bool expectedCanExecute
171171
}
172172

173173
var mockLayoutService = new Mock<ILayoutService>();
174-
mockLayoutService.Setup(l => l.GetLayoutTemplate("")).ReturnsAsync(layoutTemplate);
174+
mockLayoutService.Setup(l => l.GetLayoutTemplate(null)).ReturnsAsync(layoutTemplate);
175175
var mockWindowService = new Mock<IWindowService>();
176176
var mockSettingsService = new Mock<ISettingsService>();
177177
mockSettingsService.SetupProperty(s => s.EZLayout, keyboardLayout);
@@ -252,7 +252,7 @@ public void NextLayerCommand_Execute(int layerNumber, int nextLayerHit, int expe
252252
}
253253

254254
var mockLayoutService = new Mock<ILayoutService>();
255-
mockLayoutService.Setup(l => l.GetLayoutTemplate("")).ReturnsAsync(layoutTemplate);
255+
mockLayoutService.Setup(l => l.GetLayoutTemplate(null)).ReturnsAsync(layoutTemplate);
256256
var mockWindowService = new Mock<IWindowService>();
257257
var mockSettingsService = new Mock<ISettingsService>();
258258
mockSettingsService.SetupProperty(s => s.EZLayout, keyboardLayout);

0 commit comments

Comments
 (0)