mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
User/ryanbod/fix unittests (#5191)
* Fixing PowerLauncherViewModelTest.cs. These OpenConsole functionality was accidentlly removed in a merge conflict, which broke the build. The build was fixed, but the unit tests didn't work. 034079b441 is the offending change.
* Color picker tests need to remove the ShellPage.DefaultSndMSGCallback on cleanup.
* Fixing casing that was updated in previous change.
This commit is contained in:
committed by
GitHub
parent
c09919055a
commit
c48bd9b840
@@ -168,6 +168,23 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public HotkeySettings OpenConsole
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return settings.Properties.OpenConsole;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (settings.Properties.OpenConsole != value)
|
||||||
|
{
|
||||||
|
settings.Properties.OpenConsole = value;
|
||||||
|
UpdateSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public HotkeySettings CopyPathLocation
|
public HotkeySettings CopyPathLocation
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ namespace ViewModelTests
|
|||||||
{
|
{
|
||||||
DeleteFolder(ModuleName);
|
DeleteFolder(ModuleName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ShellPage.DefaultSndMSGCallback = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ namespace ViewModelTests
|
|||||||
|
|
||||||
viewModel.OpenPowerLauncher = openPowerLauncher;
|
viewModel.OpenPowerLauncher = openPowerLauncher;
|
||||||
viewModel.OpenFileLocation = openFileLocation;
|
viewModel.OpenFileLocation = openFileLocation;
|
||||||
|
viewModel.OpenConsole = openConsole;
|
||||||
viewModel.CopyPathLocation = copyFileLocation;
|
viewModel.CopyPathLocation = copyFileLocation;
|
||||||
|
|
||||||
Assert.AreEqual(4, sendCallbackMock.TimesSent);
|
Assert.AreEqual(4, sendCallbackMock.TimesSent);
|
||||||
|
|||||||
Reference in New Issue
Block a user