-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:
@@ -37,12 +37,16 @@ using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
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 Newtonsoft.Json.Utilities;
|
||||
@@ -282,7 +286,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
}", json);
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE)
|
||||
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
|
||||
public class SerializationEventContextTestObject
|
||||
{
|
||||
public string TestMember { get; set; }
|
||||
@@ -313,7 +317,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !PORTABLE
|
||||
#if !(PORTABLE || ASPNETCORE50)
|
||||
public void WhenSerializationErrorDetectedBySerializer_ThenCallbackIsCalled()
|
||||
{
|
||||
// Verify contract is properly finding our callback
|
||||
|
||||
Reference in New Issue
Block a user