Skip to content

Commit f4207ea

Browse files
committed
Added Obsolete attributes to old storage helper tests
1 parent 93efeaf commit f4207ea

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

UnitTests/UnitTests.UWP/Helpers/JsonObjectSerializer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace UnitTests.Helpers
1313
/// This is a Serializer which should mimic the previous functionality of 6.1.1 release of the Toolkit with Newtonsoft.Json.
1414
/// Based on <see cref="Microsoft.Toolkit.Helpers.Uwp.IObjectSerializer"/>.
1515
/// </summary>
16+
[Obsolete]
1617
internal class JsonObjectSerializer : IObjectSerializer
1718
{
1819
public T Deserialize<T>(object value)

UnitTests/UnitTests.UWP/Helpers/SystemTextJsonSerializer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ namespace UnitTests.Helpers
1212
/// Example class of writing a new <see cref="IObjectSerializer"/> that uses System.Text.Json.
1313
/// Based on <see cref="Microsoft.Toolkit.Helpers.Uwp.IObjectSerializer"/>.
1414
/// </summary>
15+
[Obsolete]
1516
internal class SystemTextJsonSerializer : IObjectSerializer
1617
{
1718
public T Deserialize<T>(object value) => JsonSerializer.Deserialize<T>(value as string);

UnitTests/UnitTests.UWP/Helpers/Test_StorageHelper.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ namespace UnitTests.Helpers
1414
[TestClass]
1515
public class Test_StorageHelper
1616
{
17+
[Obsolete]
1718
private readonly LocalObjectStorageHelper _localStorageHelperSystem = new LocalObjectStorageHelper(new SystemSerializer());
19+
[Obsolete]
1820
private readonly LocalObjectStorageHelper _localStorageHelperJsonCompat = new LocalObjectStorageHelper(new JsonObjectSerializer());
21+
[Obsolete]
1922
private readonly LocalObjectStorageHelper _localStorageHelperJsonNew = new LocalObjectStorageHelper(new SystemTextJsonSerializer());
2023

2124
/// <summary>
@@ -33,6 +36,7 @@ public void Test_StorageHelper_CheckNewtonsoftVersion()
3336

3437
[TestCategory("Helpers")]
3538
[TestMethod]
39+
[Obsolete]
3640
public void Test_StorageHelper_LegacyIntTest()
3741
{
3842
string key = "LifeUniverseAndEverything";
@@ -53,6 +57,7 @@ public void Test_StorageHelper_LegacyIntTest()
5357
/// </summary>
5458
[TestCategory("Helpers")]
5559
[TestMethod]
60+
[Obsolete]
5661
[ExpectedException(typeof(NotSupportedException))]
5762
public void Test_StorageHelper_LegacyDateTestFailure()
5863
{
@@ -72,6 +77,7 @@ public void Test_StorageHelper_LegacyDateTestFailure()
7277
/// </summary>
7378
[TestCategory("Helpers")]
7479
[TestMethod]
80+
[Obsolete]
7581
public void Test_StorageHelper_DateTestFailure()
7682
{
7783
Exception expectedException = null;
@@ -92,6 +98,7 @@ public void Test_StorageHelper_DateTestFailure()
9298

9399
[TestCategory("Helpers")]
94100
[TestMethod]
101+
[Obsolete]
95102
public void Test_StorageHelper_LegacyInternalClassTest()
96103
{
97104
string key = "Contact";
@@ -111,6 +118,7 @@ public void Test_StorageHelper_LegacyInternalClassTest()
111118

112119
[TestCategory("Helpers")]
113120
[TestMethod]
121+
[Obsolete]
114122
public void Test_StorageHelper_LegacyPublicClassTest()
115123
{
116124
string key = "Contact";
@@ -131,6 +139,7 @@ public void Test_StorageHelper_LegacyPublicClassTest()
131139

132140
[TestCategory("Helpers")]
133141
[TestMethod]
142+
[Obsolete]
134143
public void Test_StorageHelper_IntTest()
135144
{
136145
string key = "NewLifeUniverseAndEverything";
@@ -147,6 +156,7 @@ public void Test_StorageHelper_IntTest()
147156

148157
[TestCategory("Helpers")]
149158
[TestMethod]
159+
[Obsolete]
150160
public void Test_StorageHelper_NewDateTest()
151161
{
152162
string key = "NewChristmasDay";
@@ -163,6 +173,7 @@ public void Test_StorageHelper_NewDateTest()
163173

164174
[TestCategory("Helpers")]
165175
[TestMethod]
176+
[Obsolete]
166177
public void Test_StorageHelper_NewPersonTest()
167178
{
168179
string key = "Contact";

0 commit comments

Comments
 (0)