Exemple #1
0
 public void LengthGreaterThan4PropertyEqual3()
 {
     var o = GetJ(@"{ ""TheProperty"" : ""ABC"" }");
     LengthGreaterThan isnull = new LengthGreaterThan("TheProperty", 4);
     Assert.IsFalse(isnull.Evaluate(o));
 }
Exemple #2
0
 public void LengthLGreater4ThanPropertyEqual5()
 {
     var o = GetJ(@"{ ""TheProperty"" : ""ABCDE"" }");
     LengthGreaterThan isnull = new LengthGreaterThan("TheProperty", 4);
     Assert.IsTrue(isnull.Evaluate(o));
 }
 public void LengthGreaterThanNull()
 {
     LengthGreaterThan c = new LengthGreaterThan("TheProperty", 4);
     var j = GetJ(@"{""TheProperty"":null}");
     Assert.IsFalse(c.Evaluate(j));
     Assert.AreEqual(@"{""Name"":""Length"",""PropertyName"":""TheProperty"",""Kind"":""GreaterThan"",""MinimumLength"":4,""ActualLength"":0,""PropertyValue"":null,""PropertyHasValue"":true,""Description"":""The property 'TheProperty' was expected to be longer than '4' characters.""}", c.GetState(j));
 }