IsValid() public method

This is not implemented for InterPropRules since it is obsolete.
public IsValid ( ) : bool
return bool
 public void Test_IsValid_WhenLeftPropNull_ShouldRetTrue()
 {
     //---------------Set up test pack-------------------
     PropDefFake propLeft = new PropDefFake();
     PropDefFake propRight = new PropDefFake();
     InterPropRule rule = new InterPropRule(propLeft, ComparisonOperator.GreaterThan, propRight);
     DateTime? prop1Value = null;
     DateTime? prop2Value = DateTime.Now;
     IBusinessObject bo = GetBOWithPropValueSet(propLeft, prop1Value, propRight, prop2Value);
     //---------------Assert Precondition----------------
     Assert.IsNull(bo.GetPropertyValue(propLeft.PropertyName));
     //---------------Execute Test ----------------------
     bool isValid = rule.IsValid(bo);
     //---------------Test Result -----------------------
     Assert.IsTrue(isValid);
 }
 public void Test_IsValid_WhenGt_WhenEq_ShouldBeFalse()
 {
     //---------------Set up test pack-------------------
     PropDefFake prop1 = new PropDefFake();
     PropDefFake prop2 = new PropDefFake();
     InterPropRule rule = new InterPropRule(prop1, ComparisonOperator.GreaterThan, prop2);
     DateTime propValue = DateTime.Now;
     IBusinessObject bo = GetBOWithPropValueSet(prop1, propValue, prop2, propValue);
     //---------------Assert Precondition----------------
     Assert.AreEqual((DateTime)bo.GetPropertyValue(prop1.PropertyName), (DateTime)bo.GetPropertyValue(prop2.PropertyName));
     //---------------Execute Test ----------------------
     bool isValid = rule.IsValid(bo);
     //---------------Test Result -----------------------
     Assert.IsFalse(isValid);
 }
        public void Test_IsValid_WhenGt_WhenNotGtEqual_ShouldBeFalse()
        {
            //---------------Set up test pack-------------------
            PropDefFake prop1 = new PropDefFake();
            PropDefFake prop2 = new PropDefFake();
            InterPropRule rule = new InterPropRule(prop1, ComparisonOperator.GreaterThan, prop2);
            DateTime prop1Value = DateTime.Now.AddDays(-1);
            DateTime prop2Value = DateTime.Now;
            IBusinessObject bo = GetBOWithPropValueSet(prop1, prop1Value, prop2, prop2Value);
            //---------------Assert Precondition----------------
            Assert.Less((DateTime)bo.GetPropertyValue(prop1.PropertyName), (DateTime)bo.GetPropertyValue(prop2.PropertyName));
            //---------------Execute Test ----------------------
            bool isValid = rule.IsValid(bo);
            //---------------Test Result -----------------------
            Assert.IsFalse(isValid);
            string expectedMessage = string.Format("Property '{0}' with value '{1}'  should "
                                                   + "be GreaterThan property '{2}' with value '{3}'"
                                                   , prop1.PropertyName, prop1Value, prop2.PropertyName, prop2Value);

            Assert.AreEqual(expectedMessage, rule.Message);
        }
 public void Test_IsValid_WhenLTPasses_ShouldBeTrue()
 {
     //---------------Set up test pack-------------------
     PropDefFake prop1 = new PropDefFake();
     PropDefFake prop2 = new PropDefFake();
     InterPropRule rule = new InterPropRule(prop1, ComparisonOperator.LessThan, prop2);
     IBusinessObject bo = GetBOWithPropValueSet(prop1, DateTime.Now.AddDays(-1), prop2, DateTime.Now);
     //---------------Assert Precondition----------------
     Assert.Less((DateTime)bo.GetPropertyValue(prop1.PropertyName), (DateTime)bo.GetPropertyValue(prop2.PropertyName));
     //---------------Execute Test ----------------------
     bool isValid = rule.IsValid(bo);
     //---------------Test Result -----------------------
     Assert.IsTrue(isValid);
 }