BasePTSettingsTest.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using System.Text.Json; 6 using Microsoft.PowerToys.Settings.UI.Library; 7 using Microsoft.PowerToys.Settings.UI.Library.Interfaces; 8 using Microsoft.PowerToys.Settings.UI.UnitTests; 9 10 namespace Microsoft.PowerToys.Settings.UnitTest 11 { 12 public class BasePTSettingsTest : BasePTModuleSettings, ISettingsConfig 13 { 14 public BasePTSettingsTest() 15 { 16 Name = string.Empty; 17 Version = string.Empty; 18 } 19 20 public string GetModuleName() 21 { 22 return Name; 23 } 24 25 public bool UpgradeSettingsConfiguration() 26 { 27 return false; 28 } 29 30 // Override ToJsonString to use test-specific serialization context 31 public override string ToJsonString() 32 { 33 return JsonSerializer.Serialize(this, TestSettingsSerializationContext.Default.BasePTSettingsTest); 34 } 35 } 36 }