Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/Newtonsoft.Json.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Newtonsoft.Json.Tests/Serialization/MissingMemberHandlingTests.cs')
-rw-r--r--Src/Newtonsoft.Json.Tests/Serialization/MissingMemberHandlingTests.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/Src/Newtonsoft.Json.Tests/Serialization/MissingMemberHandlingTests.cs b/Src/Newtonsoft.Json.Tests/Serialization/MissingMemberHandlingTests.cs
index 5cdcf33..a80f263 100644
--- a/Src/Newtonsoft.Json.Tests/Serialization/MissingMemberHandlingTests.cs
+++ b/Src/Newtonsoft.Json.Tests/Serialization/MissingMemberHandlingTests.cs
@@ -27,14 +27,25 @@ using System;
using System.IO;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Tests.TestObjects;
+#if !NETFX_CORE
using NUnit.Framework;
+#else
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using TestFixture = Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute;
+using Test = Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute;
+#endif
namespace Newtonsoft.Json.Tests.Serialization
{
+ [TestFixture]
public class MissingMemberHandlingTests : TestFixtureBase
{
[Test]
- [ExpectedException(typeof(JsonSerializationException), ExpectedMessage = @"Could not find member 'Price' on object of type 'ProductShort'. Line 4, position 11.")]
+ [ExpectedException(typeof(JsonSerializationException)
+#if !NETFX_CORE
+ , ExpectedMessage = @"Could not find member 'Price' on object of type 'ProductShort'. Line 4, position 11."
+#endif
+ )]
public void MissingMemberDeserialize()
{
Product product = new Product();
@@ -115,7 +126,11 @@ namespace Newtonsoft.Json.Tests.Serialization
}
[Test]
- [ExpectedException(typeof(JsonSerializationException), ExpectedMessage = "Could not find member 'Missing' on object of type 'DoubleClass'. Line 1, position 11.")]
+ [ExpectedException(typeof(JsonSerializationException)
+#if !NETFX_CORE
+ , ExpectedMessage = "Could not find member 'Missing' on object of type 'DoubleClass'. Line 1, position 11."
+#endif
+ )]
public void MissingMemeber()
{
string json = @"{""Missing"":1}";