예제 #1
0
 public void LengthNotEqualsTrue()
 {
     LengthLessThanOrGreaterThan c = new LengthNotEquals("TheProperty", 4);
     var j = GetJ(@"{""TheProperty"":""ABCD""}");
     Assert.IsFalse(c.Evaluate(j));
     Assert.AreEqual(@"{""Name"":""Length"",""PropertyName"":""TheProperty"",""Kind"":""NotEquals"",""ExpectedLength"":4,""ActualLength"":4,""PropertyValue"":""ABCD"",""PropertyHasValue"":true,""Description"":""The property 'TheProperty' was expected to not be of length '4'.""}", c.GetState(j));
 }
예제 #2
0
 public void LengthNotEqualsMissing()
 {
     LengthNotEquals c = new LengthNotEquals("TheProperty", 4);
     var j = GetJ(@"{}");
     Assert.IsTrue(c.Evaluate(j));
     Assert.AreEqual(@"{""Name"":""Length"",""PropertyName"":""TheProperty"",""Kind"":""NotEquals"",""ExpectedLength"":4,""ActualLength"":0,""PropertyValue"":null,""PropertyHasValue"":false,""Description"":""The property 'TheProperty' was expected to not be of length '4'.""}", c.GetState(j));
 }