-Renamed aspnetcore50 to dnxcore50
-Documentation
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40 || ASPNETCORE50)
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40 || DNXCORE50)
|
||||
using NUnit.Framework;
|
||||
using System.Web.UI;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40 || ASPNETCORE50)
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40 || DNXCORE50)
|
||||
using NUnit.Framework;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Dynamic;
|
||||
using System.Linq;
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -38,7 +38,7 @@ using Newtonsoft.Json.Linq;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -226,7 +226,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
new JProperty("Uri", new Uri("http://json.codeplex.com/")),
|
||||
new JProperty("Guid", new Guid("EA27FE1D-0D80-44F2-BF34-4654156FA7AF")),
|
||||
new JProperty("TimeSpan", TimeSpan.FromDays(1))
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
, new JProperty("BigInteger", BigInteger.Parse("1"))
|
||||
#endif
|
||||
);
|
||||
@@ -259,7 +259,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.IsTrue(d.Decimal == 1.1m);
|
||||
Assert.IsTrue(d.Decimal != 1.0f);
|
||||
Assert.IsTrue(d.Decimal != 1.0d);
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
Assert.IsTrue(d.Decimal > new BigInteger(0));
|
||||
#endif
|
||||
|
||||
@@ -275,11 +275,11 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.IsTrue(d.Float == 1.1m);
|
||||
Assert.IsTrue(d.Float != 1.0f);
|
||||
Assert.IsTrue(d.Float != 1.0d);
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
Assert.IsTrue(d.Float > new BigInteger(0));
|
||||
#endif
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
Assert.IsTrue(d.BigInteger == d.BigInteger);
|
||||
Assert.IsTrue(d.BigInteger > 0);
|
||||
Assert.IsTrue(d.BigInteger > 0.0m);
|
||||
@@ -335,7 +335,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
new JProperty("Uri", new Uri("http://json.codeplex.com/")),
|
||||
new JProperty("Guid", new Guid("EA27FE1D-0D80-44F2-BF34-4654156FA7AF")),
|
||||
new JProperty("TimeSpan", TimeSpan.FromDays(1))
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
, new JProperty("BigInteger", new BigInteger(100))
|
||||
#endif
|
||||
);
|
||||
@@ -414,7 +414,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
r += 2;
|
||||
Assert.AreEqual(null, r.Value);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
r = d.BigInteger + null;
|
||||
Assert.AreEqual(null, r.Value);
|
||||
r += 2;
|
||||
@@ -493,7 +493,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
r -= 2;
|
||||
Assert.AreEqual(null, r.Value);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
r = d.BigInteger - null;
|
||||
Assert.AreEqual(null, r.Value);
|
||||
r -= 2;
|
||||
@@ -567,7 +567,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
r *= 2;
|
||||
Assert.AreEqual(null, r.Value);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
r = d.BigInteger * 1.1d;
|
||||
Assert.AreEqual(100m, (decimal)r);
|
||||
r *= 2;
|
||||
@@ -641,7 +641,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
r /= 2;
|
||||
Assert.AreEqual(null, r.Value);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
r = d.BigInteger / 1.1d;
|
||||
Assert.AreEqual(100m, (decimal)r);
|
||||
r /= 2;
|
||||
@@ -669,7 +669,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
new JProperty("Uri", new Uri("http://json.codeplex.com/")),
|
||||
new JProperty("Guid", new Guid("EA27FE1D-0D80-44F2-BF34-4654156FA7AF")),
|
||||
new JProperty("TimeSpan", TimeSpan.FromDays(1))
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
, new JProperty("BigInteger", new BigInteger(100))
|
||||
#endif
|
||||
);
|
||||
@@ -686,7 +686,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual("http://json.codeplex.com/", d.Uri.ToString());
|
||||
Assert.AreEqual("ea27fe1d-0d80-44f2-bf34-4654156fa7af", d.Guid.ToString());
|
||||
Assert.AreEqual("1.00:00:00", d.TimeSpan.ToString());
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
Assert.AreEqual("100", d.BigInteger.ToString());
|
||||
#endif
|
||||
}
|
||||
@@ -770,7 +770,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
AssertValueConverted<Guid?>(null);
|
||||
AssertValueConverted<Uri>(new Uri("http://json.codeplex.com/"));
|
||||
AssertValueConverted<Uri>(null);
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
AssertValueConverted<BigInteger>(new BigInteger(100));
|
||||
AssertValueConverted<BigInteger?>(null);
|
||||
#endif
|
||||
|
||||
@@ -30,7 +30,7 @@ using System.ComponentModel;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -436,7 +436,7 @@ Parameter name: index");
|
||||
}
|
||||
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void ITypedListGetItemProperties()
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ using Newtonsoft.Json.Linq;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -27,7 +27,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using Newtonsoft.Json.Serialization;
|
||||
@@ -36,7 +36,7 @@ using Newtonsoft.Json.Tests.TestObjects;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -46,7 +46,7 @@ using NUnit.Framework;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
#if !(NETFX_CORE || ASPNETCORE50)
|
||||
#if !(NETFX_CORE || DNXCORE50)
|
||||
using System.Web.UI;
|
||||
#endif
|
||||
#if NET20
|
||||
@@ -692,7 +692,7 @@ Parameter name: arrayIndex");
|
||||
Assert.AreEqual(p4, l[1]);
|
||||
}
|
||||
|
||||
#if !(NET20 || NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NET20 || NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void PropertyChanging()
|
||||
{
|
||||
@@ -1235,7 +1235,7 @@ Parameter name: arrayIndex");
|
||||
}, "Can not add property Test3 to Newtonsoft.Json.Linq.JObject. Property with the same name already exists on object.");
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void IBindingListSortDirection()
|
||||
{
|
||||
@@ -1559,7 +1559,7 @@ Parameter name: arrayIndex");
|
||||
Assert.AreEqual("Name2", value);
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void WriteObjectNullDBNullValue()
|
||||
{
|
||||
@@ -1671,7 +1671,7 @@ Parameter name: arrayIndex");
|
||||
}, "Unexpected end of content while loading JObject. Path 'short.error.code', line 6, position 15.");
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void GetProperties()
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ using Newtonsoft.Json.Linq;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -65,7 +65,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(p, p.Value.Parent);
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void ListChanged()
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -28,7 +28,7 @@ using System.Collections.Generic;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -30,7 +30,7 @@ using System.Text;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -34,7 +34,7 @@ using Newtonsoft.Json.Converters;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -361,7 +361,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
|
||||
Assert.AreEqual(5, (int)(new JValue(StringComparison.OrdinalIgnoreCase)));
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
string bigIntegerText = "1234567899999999999999999999999999999999999999999999999999999999999990";
|
||||
|
||||
Assert.AreEqual(BigInteger.Parse(bigIntegerText), (new JValue(BigInteger.Parse(bigIntegerText))).Value);
|
||||
@@ -441,7 +441,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
#endif
|
||||
ExceptionAssert.Throws<ArgumentException>(() => { var i = (Uri)new JValue(true); }, "Can not convert Boolean to Uri.");
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
ExceptionAssert.Throws<ArgumentException>(() => { var i = (new JValue(new Uri("http://www.google.com"))).ToObject<BigInteger>(); }, "Can not convert Uri to BigInteger.");
|
||||
ExceptionAssert.Throws<ArgumentException>(() => { var i = (JValue.CreateNull()).ToObject<BigInteger>(); }, "Can not convert Null to BigInteger.");
|
||||
ExceptionAssert.Throws<ArgumentException>(() => { var i = (new JValue(Guid.NewGuid())).ToObject<BigInteger>(); }, "Can not convert Guid to BigInteger.");
|
||||
@@ -458,7 +458,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
[Test]
|
||||
public void ToObject()
|
||||
{
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
Assert.AreEqual((BigInteger)1, (new JValue(1).ToObject(typeof(BigInteger))));
|
||||
Assert.AreEqual((BigInteger)1, (new JValue(1).ToObject(typeof(BigInteger?))));
|
||||
Assert.AreEqual((BigInteger?)null, (JValue.CreateNull().ToObject(typeof(BigInteger?))));
|
||||
@@ -515,7 +515,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.IsTrue(JToken.DeepEquals(new JValue((DateTimeOffset?)null), (JValue)(DateTimeOffset?)null));
|
||||
#endif
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
// had to remove implicit casting to avoid user reference to System.Numerics.dll
|
||||
Assert.IsTrue(JToken.DeepEquals(new JValue(new BigInteger(1)), new JValue(new BigInteger(1))));
|
||||
Assert.IsTrue(JToken.DeepEquals(new JValue((BigInteger?)null), new JValue((BigInteger?)null)));
|
||||
@@ -1138,7 +1138,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.IsTrue(a.DeepEquals(a2));
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void Clone()
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.Text;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -124,7 +124,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
jsonWriter.WriteValue("DVD read/writer");
|
||||
Assert.AreEqual(WriteState.Array, jsonWriter.WriteState);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
jsonWriter.WriteValue(new BigInteger(123));
|
||||
Assert.AreEqual(WriteState.Array, jsonWriter.WriteState);
|
||||
#endif
|
||||
@@ -176,7 +176,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(WriteState.Array, jsonWriter.WriteState);
|
||||
Assert.AreEqual(a[a.Count - 1], jsonWriter.CurrentToken);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
jsonWriter.WriteValue(new BigInteger(123));
|
||||
Assert.AreEqual(WriteState.Array, jsonWriter.WriteState);
|
||||
Assert.AreEqual(a[a.Count - 1], jsonWriter.CurrentToken);
|
||||
@@ -209,7 +209,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
/*fail*/]", writer.Token.ToString());
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void WriteBigInteger()
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json.Tests.TestObjects;
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -36,7 +36,7 @@ using System.Text;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -129,7 +129,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual("Pie", v.Value);
|
||||
Assert.AreEqual(JTokenType.String, v.Type);
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
v.Value = DBNull.Value;
|
||||
Assert.AreEqual(DBNull.Value, v.Value);
|
||||
Assert.AreEqual(JTokenType.Null, v.Type);
|
||||
@@ -158,7 +158,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(g, v.Value);
|
||||
Assert.AreEqual(JTokenType.Guid, v.Type);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
BigInteger i = BigInteger.Parse("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990");
|
||||
v.Value = i;
|
||||
Assert.AreEqual(i, v.Value);
|
||||
@@ -218,13 +218,13 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
v = new JValue(new Guid("B282ADE7-C520-496C-A448-4084F6803DE5"));
|
||||
Assert.AreEqual("b282ade7-c520-496c-a448-4084f6803de5", v.ToString(null, CultureInfo.InvariantCulture));
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
v = new JValue(BigInteger.Parse("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990"));
|
||||
Assert.AreEqual("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990", v.ToString(null, CultureInfo.InvariantCulture));
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void JValueParse()
|
||||
{
|
||||
@@ -473,7 +473,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50)
|
||||
[Test]
|
||||
public void ConvertsToBoolean()
|
||||
{
|
||||
@@ -492,7 +492,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(Int32.MaxValue, Convert.ToInt32(new JValue(Int32.MaxValue)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void ConvertsToInt32_BigInteger()
|
||||
{
|
||||
@@ -654,7 +654,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
v = new JValue(new Uri("http://www.google.com"));
|
||||
Assert.AreEqual(TypeCode.Object, v.GetTypeCode());
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
v = new JValue(new BigInteger(3));
|
||||
Assert.AreEqual(TypeCode.Object, v.GetTypeCode());
|
||||
#endif
|
||||
@@ -668,7 +668,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
int i = (int)v.ToType(typeof(int), CultureInfo.InvariantCulture);
|
||||
Assert.AreEqual(9, i);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
|
||||
BigInteger bi = (BigInteger)v.ToType(typeof(BigInteger), CultureInfo.InvariantCulture);
|
||||
Assert.AreEqual(new BigInteger(9), bi);
|
||||
#endif
|
||||
@@ -683,7 +683,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual("2013", v.ToString("yyyy"));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void ToStringNewTypes()
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ using Newtonsoft.Json.Tests.Bson;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -651,7 +651,7 @@ namespace Newtonsoft.Json.Tests.Linq.JsonPath
|
||||
Assert.IsTrue(JToken.DeepEquals(new JObject(new JProperty("hi", 3)), t[1]));
|
||||
}
|
||||
|
||||
#if !(PORTABLE || ASPNETCORE50 || PORTABLE40 || NET35 || NET20)
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40 || NET35 || NET20)
|
||||
[Test]
|
||||
public void GreaterQueryBigInteger()
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ using Newtonsoft.Json.Linq.JsonPath;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -647,11 +647,11 @@ namespace Newtonsoft.Json.Tests.Linq.JsonPath
|
||||
[Test]
|
||||
public void PropertyFollowingEscapedPropertyName()
|
||||
{
|
||||
JPath path = new JPath("frameworks.aspnetcore50.dependencies.['System.Xml.ReaderWriter'].source");
|
||||
JPath path = new JPath("frameworks.dnxcore50.dependencies.['System.Xml.ReaderWriter'].source");
|
||||
Assert.AreEqual(5, path.Filters.Count);
|
||||
|
||||
Assert.AreEqual("frameworks", ((FieldFilter)path.Filters[0]).Name);
|
||||
Assert.AreEqual("aspnetcore50", ((FieldFilter)path.Filters[1]).Name);
|
||||
Assert.AreEqual("dnxcore50", ((FieldFilter)path.Filters[1]).Name);
|
||||
Assert.AreEqual("dependencies", ((FieldFilter)path.Filters[2]).Name);
|
||||
Assert.AreEqual("System.Xml.ReaderWriter", ((FieldFilter)path.Filters[3]).Name);
|
||||
Assert.AreEqual("source", ((FieldFilter)path.Filters[4]).Name);
|
||||
|
||||
@@ -32,7 +32,7 @@ using Newtonsoft.Json.Linq.JsonPath;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -31,7 +31,7 @@ using System.Globalization;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -209,7 +209,7 @@ undefined
|
||||
{
|
||||
string json = @"{
|
||||
""frameworks"": {
|
||||
""aspnetcore50"": {
|
||||
""dnxcore50"": {
|
||||
""dependencies"": {
|
||||
""System.Xml.ReaderWriter"": {
|
||||
""source"": ""NuGet""
|
||||
@@ -221,9 +221,9 @@ undefined
|
||||
|
||||
JObject o = JObject.Parse(json);
|
||||
|
||||
JToken v1 = o["frameworks"]["aspnetcore50"]["dependencies"]["System.Xml.ReaderWriter"]["source"];
|
||||
JToken v1 = o["frameworks"]["dnxcore50"]["dependencies"]["System.Xml.ReaderWriter"]["source"];
|
||||
|
||||
Assert.AreEqual("frameworks.aspnetcore50.dependencies.['System.Xml.ReaderWriter'].source", v1.Path);
|
||||
Assert.AreEqual("frameworks.dnxcore50.dependencies.['System.Xml.ReaderWriter'].source", v1.Path);
|
||||
|
||||
JToken v2 = o.SelectToken(v1.Path);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ using Newtonsoft.Json.Linq;
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif ASPNETCORE50
|
||||
#elif DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
Reference in New Issue
Block a user