From c448b6e2e810630d217826e73a644f7f9815d366 Mon Sep 17 00:00:00 2001 From: Saurabh Singh <1623701+saurabh500@users.noreply.github.com> Date: Tue, 30 Jul 2024 12:35:18 -0700 Subject: [PATCH] Remove unused --- .../src/Microsoft/Data/SqlTypes/SqlJson.cs | 2 -- .../Microsoft.Data.SqlClient.Tests.csproj | 1 + .../tests/FunctionalTests/SqlJsonTest.cs | 20 +++++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlJsonTest.cs diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlJson.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlJson.cs index f40744d4ea..0167e1b88c 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlJson.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlJson.cs @@ -22,8 +22,6 @@ public class SqlJson : INullable /// private bool _isNull; - private readonly JsonDocument? _jsonDocument; - private readonly string? _jsonString; /// diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj index 5cf89f1fb5..be843bcfa8 100644 --- a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj @@ -69,6 +69,7 @@ + diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlJsonTest.cs b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlJsonTest.cs new file mode 100644 index 0000000000..2b095cf5fc --- /dev/null +++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlJsonTest.cs @@ -0,0 +1,20 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + + +using Microsoft.Data.SqlTypes; +using Xunit; + +namespace Microsoft.Data.SqlClient.Tests +{ + public class SqlJsonTest + { + [Fact] + public void SqlJsonTest_Null() + { + SqlJson json = new(); + Assert.True(json.IsNull); + } + } +}