Fix failing System.Text.Json test (dotnet/corefx#40439)
authorKristian Hellang <kristian@hellang.com>
Tue, 20 Aug 2019 09:37:34 +0000 (11:37 +0200)
committerAhson Khan <ahson_ahmedk@yahoo.com>
Tue, 20 Aug 2019 09:37:34 +0000 (02:37 -0700)
Commit migrated from https://github.com/dotnet/corefx/commit/cf5c1b0a7c3cf0087ae72fd0e1995a274cfefe27

src/libraries/System.Text.Json/tests/Serialization/CustomConverterTests.DerivedTypes.cs

index 6f8b171..680d862 100644 (file)
@@ -106,7 +106,7 @@ namespace System.Text.Json.Serialization.Tests
             };
 
             // Without converter, we throw on deserialize.
-            Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<UnsupportedDerivedTypesWrapper_IEnumerable>(json));
+            Assert.Throws<NotSupportedException>(() => JsonSerializer.Deserialize<UnsupportedDerivedTypesWrapper_IEnumerable>(json));
             // Without converter, we serialize as is.
             Assert.Equal(@"{""IEnumerableWrapper"":[""1"",""2"",""3""]}", JsonSerializer.Serialize(wrapper));