Change - Heaps of small changes and bug fixes around LINQ to JSON. Many unit tests added.

Change - CultureInfo is now always passed into FormatWith
This commit is contained in:
JamesNK
2008-04-04 22:45:52 +00:00
parent e469918596
commit ffe2d91279
34 changed files with 1104 additions and 262 deletions
+26 -25
View File
@@ -147,6 +147,7 @@ namespace Newtonsoft.Json.Tests
}
}
[JsonObject]
public class ConverableMembers
{
public string String = "string";
@@ -165,6 +166,31 @@ namespace Newtonsoft.Json.Tests
public char Char = '\0';
}
[JsonObject(MemberSerialization.OptIn)]
public class JsonIgnoreAttributeOnClassTestClass
{
private int _property = 21;
private int _ignoredProperty = 12;
[JsonProperty("TheField")]
public int Field;
[JsonProperty]
public int Property
{
get { return _property; }
}
public int IgnoredField;
[JsonProperty]
[JsonIgnore] // JsonIgnore should take priority
public int IgnoredProperty
{
get { return _ignoredProperty; }
}
}
public class JsonSerializerTest : TestFixtureBase
{
[Test]
@@ -942,31 +968,6 @@ keyword such as type of business.""
Assert.AreEqual(StringComparison.CurrentCultureIgnoreCase, s);
}
[JsonObject(MemberSerialization.OptIn)]
public class JsonIgnoreAttributeOnClassTestClass
{
private int _property = 21;
private int _ignoredProperty = 12;
[JsonProperty("TheField")]
public int Field;
[JsonProperty]
public int Property
{
get { return _property; }
}
public int IgnoredField;
[JsonProperty]
[JsonIgnore] // JsonIgnore should take priority
public int IgnoredProperty
{
get { return _ignoredProperty; }
}
}
[Test]
public void JsonIgnoreAttributeOnClassTest()
{