-Change BSON writer to write new binary subtype
-Fix BSON reader to read the old binary subtype correctly -Added JsonNet35BinaryCompadibility to BSON reader for incorrectly written BSON binary values -Changed JSON schema to use required flags instead of optional as defined in JSON schema spec 3.0 -Changed JSON schema to use divisibleBy instead of maxDecimals as defined in JSON schema spec 3.0 -Fixed detection of serialization specified flag properties -Updated to latest version of NuGet
This commit is contained in:
@@ -89,13 +89,13 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
[Test]
|
||||
public void ValidateFailureWithOutLineInfoBecauseOfEndToken()
|
||||
{
|
||||
JsonSchema schema = JsonSchema.Parse("{'properties':{'lol':{}}}");
|
||||
JsonSchema schema = JsonSchema.Parse("{'properties':{'lol':{'required':true}}}");
|
||||
JObject o = JObject.Parse("{}");
|
||||
|
||||
List<string> errors = new List<string>();
|
||||
o.Validate(schema, (sender, args) => errors.Add(args.Message));
|
||||
|
||||
Assert.AreEqual("Non-optional properties are missing from object: lol.", errors[0]);
|
||||
Assert.AreEqual("Required properties are missing from object: lol.", errors[0]);
|
||||
Assert.AreEqual(1, errors.Count);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user