-Fixed MetadataTypeAttribute reflection bug by using CustomAttributeData

-Fixed immutable collections bug by getting type from known assembly
-Added support from running tests on aspnetcore50
This commit is contained in:
James Newton-King
2014-10-18 00:00:26 +13:00
parent 4d09aca2c1
commit 88eeb8ba92
111 changed files with 1193 additions and 573 deletions
+13 -9
View File
@@ -27,22 +27,26 @@ using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
#if !(NET20 || NET35 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
using System.Numerics;
#endif
using Newtonsoft.Json.Serialization;
using Newtonsoft.Json.Tests.TestObjects;
#if !NETFX_CORE
using NUnit.Framework;
#else
#if NETFX_CORE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
#else
using NUnit.Framework;
#endif
using Newtonsoft.Json.Linq;
using System.IO;
using System.Collections;
#if !NETFX_CORE
#if !(NETFX_CORE || ASPNETCORE50)
using System.Web.UI;
#endif
#if NET20
@@ -697,7 +701,7 @@ Parameter name: arrayIndex");
Assert.AreEqual(p4, l[1]);
}
#if !(NET20 || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NET20 || NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
[Test]
public void PropertyChanging()
{
@@ -1240,7 +1244,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 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
[Test]
public void IBindingListSortDirection()
{
@@ -1564,7 +1568,7 @@ Parameter name: arrayIndex");
Assert.AreEqual("Name2", value);
}
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
[Test]
public void WriteObjectNullDBNullValue()
{
@@ -1676,7 +1680,7 @@ Parameter name: arrayIndex");
}, "Unexpected end of content while loading JObject. Path 'short.error.code', line 6, position 15.");
}
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
[Test]
public void GetProperties()
{