-Added Portable40 back

This commit is contained in:
James Newton-King
2017-04-02 10:24:09 +12:00
parent 760e9ff3f3
commit aa5f28c097
90 changed files with 978 additions and 191 deletions
@@ -159,7 +159,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}", json);
}
#if !(NET35 || NET20)
#if !(NET35 || NET20 || PORTABLE40)
[Test]
public void DynamicCamelCasePropertyNames()
{
@@ -119,7 +119,7 @@ namespace Newtonsoft.Json.Tests.Serialization
string json = o.ToString();
}
#if !(PORTABLE)
#if !(PORTABLE || PORTABLE40)
#pragma warning disable 618
[Test]
public void MemberSearchFlags()
@@ -196,7 +196,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}", json);
}
#if !(NET35 || NET20)
#if !(NET35 || NET20 || PORTABLE40)
[Test]
public void DynamicCamelCasePropertyNames()
{
@@ -115,7 +115,7 @@ namespace Newtonsoft.Json.Tests.Serialization
[TestFixture]
public class ContractResolverTests : TestFixtureBase
{
#if !(PORTABLE) || NETSTANDARD1_3
#if !(PORTABLE || PORTABLE40) || NETSTANDARD1_3
[Test]
public void ResolveSerializableContract()
{
@@ -573,7 +573,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}", startingWithB);
}
#if !(PORTABLE)
#if !(PORTABLE || PORTABLE40)
#pragma warning disable 618
[Test]
public void SerializeCompilerGeneratedMembers()
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET40 || NET35 || NET20 || DNXCORE50 || PORTABLE)
#if !(NET40 || NET35 || NET20 || DNXCORE50 || PORTABLE || PORTABLE40)
using Autofac;
using Newtonsoft.Json.Serialization;
using Newtonsoft.Json.Tests.TestObjects;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20)
#if !(NET35 || NET20 || PORTABLE40)
using System;
using System.Collections;
using System.Collections.Generic;
@@ -101,7 +101,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(dynamicObject.ChildObject.Text, d.ChildObject.Text);
}
#if !(PORTABLE)
#if !(PORTABLE || PORTABLE40)
[Test]
public void SerializeDynamicObjectWithObjectTracking()
{
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || PORTABLE || DNXCORE50)
#if !(NET35 || NET20 || PORTABLE || DNXCORE50 || PORTABLE40)
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET20 || NET35 || NET40)
#if !(NET20 || NET35 || NET40 || PORTABLE40)
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
@@ -27,7 +27,7 @@ using System;
using System.Collections;
using System.Collections.Specialized;
using System.Runtime.Serialization;
#if !(NET35 || NET20 || PORTABLE)
#if !(NET35 || NET20 || PORTABLE || PORTABLE40)
using System.Collections.Concurrent;
#endif
using System.Collections.Generic;
@@ -54,7 +54,7 @@ using Assert = Newtonsoft.Json.Tests.XUnitAssert;
#else
using NUnit.Framework;
#endif
#if !NET20
#if !NET20 && !PORTABLE40
using System.Xml.Linq;
#endif
@@ -353,7 +353,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}
#endif
#if !(NET35 || NET20 || PORTABLE)
#if !(NET35 || NET20 || PORTABLE || PORTABLE40)
public class SomeObject
{
public string Text1 { get; set; }
@@ -640,7 +640,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual("string!", l[0]);
}
#if !(NET40 || NET35 || NET20)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
[Test]
public void DeserializeReadOnlyListInterface()
{
@@ -995,7 +995,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(3, v2["Third"]);
}
#if !(NET35 || NET20 || PORTABLE)
#if !(NET35 || NET20 || PORTABLE || PORTABLE40)
[Test]
public void DeserializeConcurrentDictionary()
{
@@ -1073,7 +1073,7 @@ namespace Newtonsoft.Json.Tests.Serialization
ExceptionAssert.Throws<JsonSerializationException>(() => { JsonConvert.DeserializeObject<IList<KeyValuePair<string, IList<string>>>>(json); }, "Cannot convert null value to KeyValuePair. Path '[0]', line 1, position 6.");
}
#if !(NET40 || NET35 || NET20)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
public class PopulateReadOnlyTestClass
{
public IList<int> NonReadOnlyList { get; set; }
@@ -1916,7 +1916,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual("Product 1", p1.Name);
}
#if !(NET40 || NET35 || NET20)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
[Test]
public void ReadOnlyIntegerList()
{
@@ -1966,7 +1966,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}, "Unable to find a constructor to use for type Newtonsoft.Json.Tests.Serialization.ReadOnlyCollectionWithArrayArgument`1[System.Double]. Path '', line 1, position 1.");
}
#if !NET20
#if !NET20 && !PORTABLE40
[Test]
public void NonDefaultConstructor_DuplicateKeyInDictionary_Replace()
{
@@ -2085,7 +2085,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}
}
#if !NET20
#if !NET20 && !PORTABLE40
public class CASResponce
{
//<?xml version='1.0' encoding='iso-8859-1' ?>
@@ -2389,7 +2389,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}
}
#if !(NET40 || NET35 || NET20)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
public class ReadOnlyIntegerList : IReadOnlyCollection<int>
{
private readonly List<int> _list;
@@ -331,7 +331,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}
}
#if !(PORTABLE || NET20 || NET35)
#if !(PORTABLE || PORTABLE40 || NET20 || NET35)
[Test]
public void LargeIntegerAsString()
{
@@ -392,7 +392,7 @@ namespace Newtonsoft.Json.Tests.Serialization
@"Error converting value {null} to type 'System.Boolean'. Path '[0]', line 1, position 3.");
}
#if !(PORTABLE || NET35 || NET20)
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
[Test]
public void DeserializeBooleans()
{
@@ -842,7 +842,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual("Name!", c2.Name);
}
#if !(NET20 || NET35)
#if !(NET20 || NET35 || PORTABLE40)
[Test]
public void SerializeValueTuple()
{
@@ -1058,7 +1058,7 @@ namespace Newtonsoft.Json.Tests.Serialization
public int ChildId;
}
#if !(NET20 || NET35 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
[Test]
public void ReadIntegerWithError()
{
@@ -1426,7 +1426,7 @@ namespace Newtonsoft.Json.Tests.Serialization
serializer.TraceWriter = traceWriter;
Assert.AreEqual(traceWriter, serializer.TraceWriter);
#if !(PORTABLE || NET20 || DNXCORE50)
#if !(PORTABLE || PORTABLE40 || NET20 || DNXCORE50)
#pragma warning disable 618
serializer.TypeNameAssemblyFormat = FormatterAssemblyStyle.Full;
Assert.AreEqual(FormatterAssemblyStyle.Full, serializer.TypeNameAssemblyFormat);
@@ -1541,7 +1541,7 @@ namespace Newtonsoft.Json.Tests.Serialization
settings.TraceWriter = traceWriter;
Assert.AreEqual(traceWriter, settings.TraceWriter);
#if !(PORTABLE || NET20 || DNXCORE50)
#if !(PORTABLE || PORTABLE40 || NET20 || DNXCORE50)
#pragma warning disable 618
settings.TypeNameAssemblyFormat = FormatterAssemblyStyle.Full;
Assert.AreEqual(FormatterAssemblyStyle.Full, settings.TypeNameAssemblyFormat);
@@ -1663,7 +1663,7 @@ namespace Newtonsoft.Json.Tests.Serialization
serializerProxy.TraceWriter = traceWriter;
Assert.AreEqual(traceWriter, serializerProxy.TraceWriter);
#if !(PORTABLE || NET20 || DNXCORE50)
#if !(PORTABLE || PORTABLE40 || NET20 || DNXCORE50)
#pragma warning disable 618
serializerProxy.TypeNameAssemblyFormat = FormatterAssemblyStyle.Full;
Assert.AreEqual(FormatterAssemblyStyle.Full, serializerProxy.TypeNameAssemblyFormat);
@@ -1684,7 +1684,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(TypeNameHandling.All, serializerProxy.TypeNameHandling);
}
#if !(PORTABLE || DNXCORE50)
#if !(PORTABLE || PORTABLE40 || DNXCORE50)
[Test]
public void DeserializeISerializableIConvertible()
{
@@ -2847,7 +2847,7 @@ keyword such as type of business.""
ConverableMembers c = JsonConvert.DeserializeObject<ConverableMembers>(json);
Assert.AreEqual("string", c.String);
Assert.AreEqual(double.MaxValue, c.Double);
#if !(PORTABLE || DNXCORE50)
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
Assert.AreEqual(DBNull.Value, c.DBNull);
#endif
}
@@ -4098,7 +4098,7 @@ Path '', line 1, position 1.");
@"Unexpected character encountered while parsing value: [. Path '', line 1, position 1.");
}
#if !(NET35 || NET20)
#if !(NET35 || NET20 || PORTABLE40)
[Test]
public void CannotDeserializeArrayIntoDynamic()
{
@@ -4194,7 +4194,7 @@ Path '', line 1, position 1.");
{
ContractResolver = new DefaultContractResolver
{
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_3
IgnoreSerializableAttribute = true
#endif
}
@@ -4211,7 +4211,7 @@ Path '', line 1, position 1.");
{
ContractResolver = new DefaultContractResolver
{
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_3
IgnoreSerializableAttribute = true
#endif
}
@@ -4228,7 +4228,7 @@ Path '', line 1, position 1.");
{
ContractResolver = new DefaultContractResolver
{
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_3
IgnoreSerializableAttribute = true
#endif
}
@@ -4245,7 +4245,7 @@ Path '', line 1, position 1.");
{
ContractResolver = new DefaultContractResolver
{
#if !(PORTABLE || DNXCORE50)
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
IgnoreSerializableAttribute = true
#endif
}
@@ -5020,7 +5020,7 @@ Path '', line 1, position 1.");
Assert.AreEqual("value", newModelStateDictionary["key"]);
}
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_3
#if DEBUG
[Test]
public void SerializeISerializableInPartialTrustWithIgnoreInterface()
@@ -5439,7 +5439,7 @@ Path '', line 1, position 1.");
}
#endif
#if !(NET20)
#if !(NET20 || PORTABLE40)
[Test]
public void SerializeDeserializeXNodeProperties()
{
@@ -5470,7 +5470,7 @@ Path '', line 1, position 1.");
}
#endif
#if !(PORTABLE || DNXCORE50)
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void SerializeDeserializeXmlNodeProperties()
{
@@ -5954,7 +5954,7 @@ Path '', line 1, position 1.");
}", json);
}
#if !(NET35 || NET20)
#if !(NET35 || NET20 || PORTABLE40)
[Test]
public void SerializeExpandoObject()
{
@@ -6872,7 +6872,7 @@ Path '', line 1, position 1.");
}
}
#if !(PORTABLE || DNXCORE50)
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void SerializeException1()
{
@@ -8050,7 +8050,7 @@ Path '', line 1, position 1.");
Assert.AreEqual("", s);
}
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_3
[Test]
public void SerializeAndDeserializeWithAttributes()
{
@@ -8253,7 +8253,7 @@ lines.*/
ExceptionAssert.Throws<JsonReaderException>(() => { s.Deserialize<Dictionary<string, int>>(new JsonTextReader(new StringReader(json))); }, "Additional text encountered after finished reading JSON content: {. Path '', line 7, position 0.");
}
#if !(PORTABLE || DNXCORE50)
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void DeserializeException()
{
@@ -8481,7 +8481,7 @@ This is just junk, though.";
Assert.AreEqual("[1.1,0.0,0.0]", json);
}
#if !(NET20 || NET35 || NET40)
#if !(NET20 || NET35 || NET40 || PORTABLE40)
#if !PORTABLE || NETSTANDARD1_3
[Test]
public void DeserializeReadOnlyListWithBigInteger()
@@ -8540,7 +8540,7 @@ This is just junk, though.";
Action doStuff = () => { obj = JsonConvert.DeserializeObject<MyTuple<int>>(json); };
#if !(PORTABLE || DNXCORE50)
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
doStuff();
Assert.AreEqual(500, obj.Item1);
#else
@@ -8571,7 +8571,7 @@ This is just junk, though.";
}
#endif
#if !(PORTABLE || NET35 || NET20 || DNXCORE50)
#if !(PORTABLE || NET35 || NET20 || PORTABLE40 || DNXCORE50)
[Test]
public void SerializeTupleWithSerializableAttribute()
{
@@ -8789,7 +8789,7 @@ This is just junk, though.";
ExceptionAssert.Throws<JsonSerializationException>(() => JsonConvert.DeserializeObject<NoConstructorReadOnlyCollection<int>>("[1]"), "Cannot deserialize readonly or fixed size list: Newtonsoft.Json.Tests.Serialization.JsonSerializerTest+NoConstructorReadOnlyCollection`1[System.Int32]. Path '', line 1, position 1.");
}
#if !(NET40 || NET35 || NET20)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
public class NoConstructorReadOnlyDictionary<TKey, TValue> : ReadOnlyDictionary<TKey, TValue>
{
public NoConstructorReadOnlyDictionary()
@@ -8805,7 +8805,7 @@ This is just junk, though.";
}
#endif
#if !(PORTABLE || NET35 || NET20) || NETSTANDARD1_3
#if !(PORTABLE || NET35 || NET20 || PORTABLE40) || NETSTANDARD1_3
[Test]
public void ReadTooLargeInteger()
{
@@ -8848,7 +8848,7 @@ This is just junk, though.";
Assert.AreEqual(@"{""First"":""One"",""Second"":2}", json);
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_3
DefaultContractResolver r = new DefaultContractResolver();
r.IgnoreSerializableAttribute = false;
@@ -8964,7 +8964,7 @@ This is just junk, though.";
Assert.AreEqual(1234567890.123456m, d);
}
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_3
[Test]
public void DontSerializeStaticFields()
{
@@ -8988,7 +8988,7 @@ This is just junk, though.";
}
#endif
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_3
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_3
[Test]
public void SerializeBigInteger()
{
@@ -9128,7 +9128,7 @@ This is just junk, though.";
]", json);
}
#if !(PORTABLE || DNXCORE50)
#if !(PORTABLE || PORTABLE40 || DNXCORE50)
[Test]
public void SerializeDictionaryWithStructKey()
{
@@ -9145,7 +9145,7 @@ This is just junk, though.";
}
#endif
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_0 || NETSTANDARD1_3
#if !(PORTABLE || PORTABLE40 || DNXCORE50) || NETSTANDARD1_0 || NETSTANDARD1_3
[Test]
public void SerializeDictionaryWithStructKey_Custom()
{
@@ -9332,7 +9332,7 @@ This is just junk, though.";
Assert.AreEqual(jane, john.Spouse);
}
#if !(NET35 || NET20 || PORTABLE)
#if !(NET35 || NET20 || PORTABLE || PORTABLE40)
[Test]
public void TypeConverterOnInterface()
{
@@ -9910,7 +9910,7 @@ This is just junk, though.";
Assert.AreEqual("derived", d.DerivedProperty);
}
#if !(NET20 || NET35 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
[Test]
public void DeserializeNullableUnsignedLong()
{
@@ -10292,7 +10292,7 @@ This is just junk, though.";
public string Project { get; }
}
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_3
public class ISerializableTestObject : ISerializable
{
internal string _stringValue;
@@ -339,7 +339,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.IsTrue(JToken.DeepEquals(t1, t2));
}
#if !(PORTABLE || DNXCORE50)
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void DeserializeGenericObjectListWithTypeName()
{
@@ -151,7 +151,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}", json);
}
#if !(PORTABLE || DNXCORE50)
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
public class MainClass : ISerializable
{
public ChildClass Child { get; set; }
@@ -210,7 +210,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}
#endif
#if !(NET20 || NET35)
#if !(NET20 || NET35 || PORTABLE40)
public class DictionaryDynamicObject : DynamicObject
{
public IDictionary<string, object> Values { get; private set; }
@@ -741,7 +741,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(@"Unexpected end when deserializing object. Path 'events2.code', line 1, position 49.", errors[1]);
}
#if !(NET35 || NET20)
#if !(NET35 || NET20 || PORTABLE40)
[Test]
public void ErrorHandlingEndOfContentDynamic()
{
@@ -159,7 +159,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}", json);
}
#if !(NET35 || NET20)
#if !(NET35 || NET20 || PORTABLE40)
[Test]
public void DynamicSnakeCasePropertyNames()
{
@@ -4,7 +4,7 @@ using System.Diagnostics;
using System.Globalization;
using System.IO;
using Newtonsoft.Json.Linq;
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_3
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_3
using System.Numerics;
#endif
using System.Runtime.Serialization;
@@ -41,7 +41,7 @@ namespace Newtonsoft.Json.Tests.Serialization
[TestFixture]
public class TraceWriterTests : TestFixtureBase
{
#if !(PORTABLE || DNXCORE50)
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void DiagnosticsTraceWriterTest()
{
@@ -730,7 +730,7 @@ Newtonsoft.Json Error: 0 : Error!
Assert.IsTrue(traceWriter.TraceRecords[9].Message.StartsWith("Finished deserializing System.Collections.Generic.List`1[System.Object]. Path '$values'"));
}
#if !(PORTABLE || DNXCORE50)
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void DeserializeISerializable()
{
@@ -936,7 +936,7 @@ Newtonsoft.Json Error: 0 : Error!
Assert.AreEqual(23, deserialized.FavoriteNumber);
}
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_3
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_3
[Test]
public void TraceJsonWriterTest()
{
@@ -28,7 +28,7 @@ using Newtonsoft.Json.Utilities.LinqBridge;
#else
using System.Linq;
#endif
#if !(PORTABLE)
#if !(PORTABLE || PORTABLE40)
using System.Collections.ObjectModel;
#if !(NET35 || NET20)
using System.Dynamic;
@@ -1737,7 +1737,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(1, (int)j["MyProperty"]);
}
#if !(NET35 || NET20)
#if !(NET35 || NET20 || PORTABLE40)
[Test]
public void PropertyItemTypeNameHandlingDynamic()
{
@@ -2036,7 +2036,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}
#endif
#if !(NET20 || PORTABLE)
#if !(NET20 || PORTABLE || PORTABLE40)
[Test]
public void DeserializeComplexGenericDictionary_Simple()
{
@@ -2329,7 +2329,7 @@ namespace Newtonsoft.Json.Tests.Serialization
public TypeNameHandlingTestObject Data { get; set; }
}
#if !(NET35 || NET20)
#if !(NET35 || NET20 || PORTABLE40)
public class PropertyItemTypeNameHandlingDynamic
{
[JsonProperty(ItemTypeNameHandling = TypeNameHandling.All)]
@@ -59,7 +59,7 @@ namespace Newtonsoft.Json.Tests.Serialization
nonSerializedField = "Error"
};
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
MemoryStream ms = new MemoryStream();
DataContractJsonSerializer dataContractJsonSerializer = new DataContractJsonSerializer(typeof(SerializableType));
dataContractJsonSerializer.WriteObject(ms, serializableType);
@@ -75,7 +75,7 @@ namespace Newtonsoft.Json.Tests.Serialization
{
ContractResolver = new DefaultContractResolver
{
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_3
IgnoreSerializableAttribute = false
#endif
}
@@ -84,7 +84,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(expected, json);
}
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_3
[Test]
public void SerializeInheritedType()
{
@@ -114,7 +114,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}
}
#if !(PORTABLE || DNXCORE50) || NETSTANDARD1_3
#if !(PORTABLE || DNXCORE50 || PORTABLE40) || NETSTANDARD1_3
[Serializable]
#else
[JsonObject(MemberSerialization.Fields)]
@@ -138,7 +138,7 @@ namespace Newtonsoft.Json.Tests.Serialization
set { privateField = value; }
}
#if !(PORTABLE || DNXCORE50)
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
[NonSerialized]
#else
[JsonIgnore]