From 044a6ed4bc579f5934a422d5a6bac3240837ade0 Mon Sep 17 00:00:00 2001 From: Ankur Garg Date: Sun, 1 Oct 2023 23:00:24 -0400 Subject: [PATCH 1/2] Fixed the support for test projects. --- src/GeoJSON.Text.Test.Unit/GeoJSON.Text.Test.Unit.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GeoJSON.Text.Test.Unit/GeoJSON.Text.Test.Unit.csproj b/src/GeoJSON.Text.Test.Unit/GeoJSON.Text.Test.Unit.csproj index 98b0210..4aaddd3 100644 --- a/src/GeoJSON.Text.Test.Unit/GeoJSON.Text.Test.Unit.csproj +++ b/src/GeoJSON.Text.Test.Unit/GeoJSON.Text.Test.Unit.csproj @@ -4,7 +4,7 @@ {6C93B314-9208-4684-B873-172F7EC81689} GeoJSON.Text.Tests GeoJSON.Text.Tests - net462,net6.0;net7.0;netcoreapp3.1 + net6.0;net7.0;netstandard2.0 false 10 From fe2d55b5f2551ebd50be7a3615919fbd790dc6e7 Mon Sep 17 00:00:00 2001 From: Ankur Garg Date: Sun, 1 Oct 2023 23:15:49 -0400 Subject: [PATCH 2/2] Fixed tests. Private "set" was causing issue --- .../Feature/FeatureCollectionTests.cs | 8 ++++---- src/GeoJSON.Text/Feature/FeatureCollection.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/GeoJSON.Text.Test.Unit/Feature/FeatureCollectionTests.cs b/src/GeoJSON.Text.Test.Unit/Feature/FeatureCollectionTests.cs index 5e6d47e..c3116ab 100644 --- a/src/GeoJSON.Text.Test.Unit/Feature/FeatureCollectionTests.cs +++ b/src/GeoJSON.Text.Test.Unit/Feature/FeatureCollectionTests.cs @@ -46,8 +46,8 @@ public void Can_DeserializeGeneric() Assert.IsNotNull(featureCollection); Assert.IsNotNull(featureCollection.Features); Assert.AreEqual(featureCollection.Features.Count, 3); - Assert.AreEqual("DD", featureCollection.Features.First().Properties.Name); - Assert.AreEqual(123, featureCollection.Features.First().Properties.Size); + Assert.AreEqual("DD", featureCollection.Features.First().Properties.name); + Assert.AreEqual(123, featureCollection.Features.First().Properties.size); } [Test] @@ -188,7 +188,7 @@ private void Assert_Are_Equal(FeatureCollection left, FeatureCollection right) private class FeatureCollectionTestPropertyObject { - public string Name { get; set; } - public int Size { get; set; } + public string name { get; set; } + public int size { get; set; } } } \ No newline at end of file diff --git a/src/GeoJSON.Text/Feature/FeatureCollection.cs b/src/GeoJSON.Text/Feature/FeatureCollection.cs index f724c95..8caeefc 100644 --- a/src/GeoJSON.Text/Feature/FeatureCollection.cs +++ b/src/GeoJSON.Text/Feature/FeatureCollection.cs @@ -164,7 +164,7 @@ public FeatureCollection(List> features) /// /// The features. [JsonPropertyName("features")] - new public List> Features { get; private set; } + public new List> Features { get; set; } #region IEqualityComparer, IEquatable