mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
Remove obsolete test
This commit is contained in:
@@ -10,7 +10,6 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
|||||||
public abstract class BasePTModuleSettings
|
public abstract class BasePTModuleSettings
|
||||||
{
|
{
|
||||||
// Gets or sets name of the powertoy module.
|
// Gets or sets name of the powertoy module.
|
||||||
[JsonRequired]
|
|
||||||
[JsonPropertyName("name")]
|
[JsonPropertyName("name")]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation
|
|
||||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
||||||
// See the LICENSE file in the project root for more information.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO.Abstractions.TestingHelpers;
|
|
||||||
using System.Text.Json;
|
|
||||||
using Microsoft.PowerToys.Settings.UI.Library;
|
|
||||||
using Microsoft.PowerToys.Settings.UnitTest;
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
||||||
|
|
||||||
namespace CommonLibTest
|
|
||||||
{
|
|
||||||
[TestClass]
|
|
||||||
public class BasePTModuleSettingsTest
|
|
||||||
{
|
|
||||||
[TestMethod]
|
|
||||||
[ObsoleteAttribute("This test method is obsolete.", true)]
|
|
||||||
public void ToJsonStringShouldReturnValidJSONOfModelWhenSuccessful()
|
|
||||||
{
|
|
||||||
// Mock Disk access
|
|
||||||
var mockFileSystem = new MockFileSystem();
|
|
||||||
var settingsUtils = new SettingsUtils(mockFileSystem);
|
|
||||||
|
|
||||||
// Arrange
|
|
||||||
string file_name = "test\\BasePTModuleSettingsTest";
|
|
||||||
string testSettingsConfigs = new BasePTSettingsTest().ToJsonString();
|
|
||||||
settingsUtils.SaveSettings(testSettingsConfigs, file_name);
|
|
||||||
|
|
||||||
// Act
|
|
||||||
JsonDocument doc = JsonDocument.Parse(settingsUtils.GetSettingsOrDefault<BasePTSettingsTest>(file_name).ToJsonString());
|
|
||||||
BasePTSettingsTest settings = doc.Deserialize<BasePTSettingsTest>();
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsNotNull(settings.Name);
|
|
||||||
Assert.IsNotNull(settings.Version);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user