mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
[PowerToys Run] Plugin manager (#9872)
This commit is contained in:
@@ -66,13 +66,12 @@ namespace ViewModelTests
|
||||
|
||||
// Initialise View Model with test Config files
|
||||
Func<string, int> sendMockIPCConfigMSG = msg => { return 0; };
|
||||
PowerLauncherViewModel viewModel = new PowerLauncherViewModel(mockSettingsUtils, generalSettingsRepository, sendMockIPCConfigMSG, 32);
|
||||
PowerLauncherViewModel viewModel = new PowerLauncherViewModel(mockSettingsUtils, generalSettingsRepository, sendMockIPCConfigMSG, 32, () => true);
|
||||
|
||||
// Verify that the old settings persisted
|
||||
Assert.AreEqual(originalGeneralSettings.Enabled.PowerLauncher, viewModel.EnablePowerLauncher);
|
||||
Assert.AreEqual(originalSettings.Properties.ClearInputOnLaunch, viewModel.ClearInputOnLaunch);
|
||||
Assert.AreEqual(originalSettings.Properties.CopyPathLocation.ToString(), viewModel.CopyPathLocation.ToString());
|
||||
Assert.AreEqual(originalSettings.Properties.DisableDriveDetectionWarning, viewModel.DisableDriveDetectionWarning);
|
||||
Assert.AreEqual(originalSettings.Properties.IgnoreHotkeysInFullscreen, viewModel.IgnoreHotkeysInFullScreen);
|
||||
Assert.AreEqual(originalSettings.Properties.MaximumNumberOfResults, viewModel.MaximumNumberOfResults);
|
||||
Assert.AreEqual(originalSettings.Properties.OpenPowerLauncher.ToString(), viewModel.OpenPowerLauncher.ToString());
|
||||
@@ -173,16 +172,5 @@ namespace ViewModelTests
|
||||
Assert.IsTrue(mockSettings.Properties.OverrideWinkeyR);
|
||||
Assert.IsFalse(mockSettings.Properties.OverrideWinkeyS);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DriveDetectionViewModelWhenSetMustUpdateOverrides()
|
||||
{
|
||||
// Act
|
||||
viewModel.DisableDriveDetectionWarning = true;
|
||||
|
||||
// Assert
|
||||
Assert.AreEqual(1, sendCallbackMock.TimesSent);
|
||||
Assert.IsTrue(mockSettings.Properties.DisableDriveDetectionWarning);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user