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