Example #1
0
 public void LengthBetween47PropertyEqual8()
 {
     var o = GetJ(@"{ ""TheProperty"" : ""ABCDEFGH"" }");
     LengthBetween isnull = new LengthBetween("TheProperty", 4, 7);
     Assert.IsFalse(isnull.Evaluate(o));
     Assert.AreEqual(8, isnull.ActualLength);
 }
Example #2
0
 public void LengthBetween17PropertyMissingImplicit()
 {
     var o = GetJ(@"{}");
     LengthBetween isnull = new LengthBetween("TheProperty", 1, 7);
     Assert.IsFalse(isnull.Evaluate(o));
     Assert.AreEqual(0, isnull.ActualLength);
 }
Example #3
0
 public void LengthBetween17PropertyNullNotImplicit()
 {
     var o = GetJ(@"{""TheProperty"":null}");
     LengthBetween isnull = new LengthBetween("TheProperty", 1, 7, false, false);
     Assert.IsFalse(isnull.Evaluate(o));
     Assert.AreEqual(0, isnull.ActualLength);
 }
Example #4
0
 public void LengthBetween07PropertyNullImplicit()
 {
     var o = GetJ(@"{""TheProperty"":null}");
     LengthBetween isnull = new LengthBetween("TheProperty", 0, 7);
     Assert.IsTrue(isnull.Evaluate(o));
     Assert.AreEqual(0, isnull.ActualLength);
 }