コード例 #1
0
    public void IntegerLessThanMaximumValue_BigInteger()
    {
      string schemaJson = @"{
  ""type"":""integer"",
  ""minimum"":5
}";

      JValue v = new JValue(new BigInteger(1));

      Json.Schema.ValidationEventArgs validationEventArgs = null;

      v.Validate(JsonSchema.Parse(schemaJson), (sender, args) => { validationEventArgs = args; });

      Assert.IsNotNull(validationEventArgs);
      Assert.AreEqual("Integer 1 is less than minimum value of 5.", validationEventArgs.Message);
      Assert.AreEqual("", validationEventArgs.Path);
    }