public void LengthNotEqualsPropertyEqual12() { var o = GetJ(@"{ ""TheProperty"" : ""AB"" }"); LengthNotEquals isnull = new LengthNotEquals("TheProperty", 1); Assert.IsTrue(isnull.Evaluate(o)); }
public void LengthNotEquals0NullImplicit() { var o = GetJ(@"{""TheProperty"":null}"); LengthNotEquals isnull = new LengthNotEquals("TheProperty", 0); Assert.IsFalse(isnull.Evaluate(o)); }
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)); }
public void LengthNotEquals0MissingExplicit() { var o = GetJ(@"{}"); LengthNotEquals isnull = new LengthNotEquals("TheProperty", 0, false, true); Assert.IsTrue(isnull.Evaluate(o)); }
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)); }