mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
Add test for ExtendedContextMenuOnly setting
Co-authored-by: yeelam-gordon <73506701+yeelam-gordon@users.noreply.github.com>
This commit is contained in:
@@ -204,6 +204,23 @@ namespace ViewModelTests
|
||||
Assert.AreEqual(3, viewModel.Encoder);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ExtendedContextMenuOnlyShouldUpdateValueWhenSuccessful()
|
||||
{
|
||||
// arrange
|
||||
var fileSystemMock = new MockFileSystem();
|
||||
var mockSettingsUtils = new SettingsUtils(fileSystemMock);
|
||||
Func<string, int> sendMockIPCConfigMSG = msg => { return 0; };
|
||||
ImageResizerViewModel viewModel = new ImageResizerViewModel(mockSettingsUtils, SettingsRepository<GeneralSettings>.GetInstance(_mockGeneralSettingsUtils.Object), sendMockIPCConfigMSG, (string name) => name);
|
||||
|
||||
// act
|
||||
viewModel.ExtendedContextMenuOnly = true;
|
||||
|
||||
// Assert
|
||||
viewModel = new ImageResizerViewModel(mockSettingsUtils, SettingsRepository<GeneralSettings>.GetInstance(_mockGeneralSettingsUtils.Object), sendMockIPCConfigMSG, (string name) => name);
|
||||
Assert.IsTrue(viewModel.ExtendedContextMenuOnly);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void AddImageSizeShouldAddNewImageSizeWhenSuccessful()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user