mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Win arrows revisited (#5932)
* Added the setting * Refactored existing code, the main feature isn't implemented yet * Renamed a method * Updated a comment in IZoneWindow * Added the zone selection algorithm, didn't test it * Basic features work * Single monitor cycling works * Seems that the feature works well * Polished the settings page * Rebase fix * Fixed a null pointer dereference * Use classic if syntax * Fixed bad indentation How did these lines unindent themselves? * Removed TODO comment * Rebase fix * Another rebase fix
This commit is contained in:
@@ -107,6 +107,25 @@ namespace ViewModelTests
|
||||
viewModel.OverrideSnapHotkeys = true;
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MoveWindowsBasedOnPosition_ShouldSetValue2True_WhenSuccessful()
|
||||
{
|
||||
// Assert
|
||||
Func<string, int> SendMockIPCConfigMSG = msg =>
|
||||
{
|
||||
FancyZonesSettingsIPCMessage snd = JsonSerializer.Deserialize<FancyZonesSettingsIPCMessage>(msg);
|
||||
Assert.IsTrue(snd.Powertoys.FancyZones.Properties.FancyzonesMoveWindowsBasedOnPosition.Value);
|
||||
return 0;
|
||||
};
|
||||
|
||||
// arrange
|
||||
FancyZonesViewModel viewModel = new FancyZonesViewModel(SendMockIPCConfigMSG, FancyZonesTestFolderName);
|
||||
Assert.IsFalse(viewModel.MoveWindowsBasedOnPosition); // check if value was initialized to false.
|
||||
|
||||
// act
|
||||
viewModel.MoveWindowsBasedOnPosition = true;
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ZoneSetChangeFlashZones_ShouldSetValue2False_WhenSuccessful()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user