-Added AttributeProvider

-Increament version to 7.0.1
This commit is contained in:
James Newton-King
2014-12-23 10:57:17 +00:00
parent d22b5fd534
commit a2e15adf80
29 changed files with 389 additions and 29 deletions
@@ -25,6 +25,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Runtime.Serialization;
#if NETFX_CORE
@@ -155,6 +156,17 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.IsNotNull(contract.DefaultCreator);
}
[Test]
public void PropertyAttributeProvider()
{
var resolver = new DefaultContractResolver();
var contract = (JsonObjectContract)resolver.ResolveContract(typeof(Invoice));
JsonProperty property = contract.Properties["FollowUpDays"];
Assert.AreEqual(1, property.AttributeProvider.GetAttributes(false).Count);
Assert.AreEqual(typeof(DefaultValueAttribute), property.AttributeProvider.GetAttributes(false)[0].GetType());
}
[Test]
public void AbstractTestClass()
{