-Lots and lots of JSON Schema work

-JSON Schema spec tests added
-Added Path to JToken
-Fixed JTokenWriter returning null reference
-Build script logging
-Documentation
-Updated to NUnit 2.6
This commit is contained in:
James Newton-King
2012-12-31 00:53:08 +13:00
parent 86a9b7b66b
commit e3a720504e
110 changed files with 19585 additions and 5992 deletions
@@ -864,5 +864,24 @@ keyword such as type of business.""
JArray a = JArray.Parse(json);
Assert.AreEqual("hi!", (string)a[0]);
}
#if !(NET35 || NET20 || WINDOWS_PHONE || PORTABLE)
[Test]
public void ExceptionFromOverloadWithJValue()
{
dynamic name = new JValue("Matthew Doig");
IDictionary<string, string> users = new Dictionary<string, string>();
// unfortunatly there doesn't appear to be a way around this
ExceptionAssert.Throws<Microsoft.CSharp.RuntimeBinder.RuntimeBinderException>("The best overloaded method match for 'System.Collections.Generic.IDictionary<string,string>.Add(string, string)' has some invalid arguments",
() =>
{
users.Add("name2", name);
Assert.AreEqual(users["name2"], "Matthew Doig");
});
}
#endif
}
}