public void MDRenderIsEnabled_ShouldPrevHandler_WhenSuccessful() { // arrange PowerPreviewViewModel viewModel = new PowerPreviewViewModel(); // Assert ShellPage.DefaultSndMSGCallback = msg => { SndModuleSettings <SndPowerPreviewSettings> snd = JsonSerializer.Deserialize <SndModuleSettings <SndPowerPreviewSettings> >(msg); Assert.IsTrue(snd.powertoys.FileExplorerPreviewSettings.properties.EnableMd.Value); }; // act viewModel.MDRenderIsEnabled = true; }
public void SVGThumbnailIsEnabledShouldPrevHandlerWhenSuccessful() { // Assert Func <string, int> sendMockIPCConfigMSG = msg => { SndModuleSettings <SndPowerPreviewSettings> snd = JsonSerializer.Deserialize <SndModuleSettings <SndPowerPreviewSettings> >(msg); Assert.IsTrue(snd.PowertoysSetting.FileExplorerPreviewSettings.Properties.EnableSvgThumbnail); return(0); }; // arrange PowerPreviewViewModel viewModel = new PowerPreviewViewModel(SettingsRepository <PowerPreviewSettings> .GetInstance(mockPowerPreviewSettingsUtils.Object), SettingsRepository <GeneralSettings> .GetInstance(mockGeneralSettingsUtils.Object), sendMockIPCConfigMSG, PowerPreviewSettings.ModuleName); // act viewModel.SVGThumbnailIsEnabled = true; }
public void MDRenderIsEnabled_ShouldPrevHandler_WhenSuccessful() { // Assert Func <string, int> SendMockIPCConfigMSG = msg => { SndModuleSettings <SndPowerPreviewSettings> snd = JsonSerializer.Deserialize <SndModuleSettings <SndPowerPreviewSettings> >(msg); Assert.IsTrue(snd.PowertoysSetting.FileExplorerPreviewSettings.Properties.EnableMdPreview); return(0); }; // arrange PowerPreviewViewModel viewModel = new PowerPreviewViewModel(ISettingsUtilsMocks.GetStubSettingsUtils().Object, SendMockIPCConfigMSG, Module);; // act viewModel.MDRenderIsEnabled = true; }
public void SVGThumbnailIsEnabled_ShouldPrevHandler_WhenSuccessful() { // Assert Func <string, int> SendMockIPCConfigMSG = msg => { SndModuleSettings <SndPowerPreviewSettings> snd = JsonSerializer.Deserialize <SndModuleSettings <SndPowerPreviewSettings> >(msg); Assert.IsTrue(snd.powertoys.FileExplorerPreviewSettings.Properties.EnableSvgThumbnail); return(0); }; // arrange PowerPreviewViewModel viewModel = new PowerPreviewViewModel(SendMockIPCConfigMSG, Module); // act viewModel.SVGThumbnailIsEnabled = true; }
public PowerPreviewPage() { InitializeComponent(); ViewModel = new PowerPreviewViewModel(); PowerPreviewSettingsView.DataContext = ViewModel; }
public PowerPreviewPage() { this.InitializeComponent(); viewModel = new PowerPreviewViewModel(); this.PowerPreviewSettingsView.DataContext = viewModel; }
public PowerPreviewPage() { this.InitializeComponent(); viewModel = new PowerPreviewViewModel(ShellPage.SendDefaultIPCMessage); DataContext = viewModel; }