Remove obsolete test

This commit is contained in:
Stefan Markovic
2022-12-16 12:04:03 +01:00
parent 6e285b5c0b
commit 197a503534
2 changed files with 0 additions and 40 deletions

View File

@@ -10,7 +10,6 @@ namespace Microsoft.PowerToys.Settings.UI.Library
public abstract class BasePTModuleSettings
{
// Gets or sets name of the powertoy module.
[JsonRequired]
[JsonPropertyName("name")]
public string Name { get; set; }

View File

@@ -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);
}
}
}