public void StringPropContainsConstant() { var person = new Person() { FirstName = "Andrew" }; var propCompareCondition = new PropertyCompare() { PropertyName = "FirstName", PropertyValue = "dr", Operator = PropertyCompareOps.Contains }; var evalRes = propCompareCondition.Evaluate(this.svcProvider, person); Assert.IsTrue(evalRes); }
public void StringPropEqualToConstant() { var person = new Person() { FirstName = "Fred" }; var propCompareCondition = new PropertyCompare() { PropertyName = "FirstName", PropertyValue = "Fred", Operator = PropertyCompareOps.AreEqual }; var evalRes = propCompareCondition.Evaluate(this.svcProvider, person); Assert.IsTrue(evalRes); }
public void ComparePropertyNotFound() { var person = new Person() { FirstName = "Bugs", LastName = "Bunny", DateOfBirth = new DateTime(1965, 2, 17) }; var propCompareCondition = new PropertyCompare() { PropertyName = "Age", PropertyValue = 50, Operator = PropertyCompareOps.GreaterThan }; propCompareCondition.Evaluate(this.svcProvider, person); }
public void IntPropGreaterThanConstant() { var person = new Person() { FirstName = "Bugs", LastName = "Bunny", DateOfBirth = new DateTime(1965, 2, 17) }; var propCompareCondition = new PropertyCompare() { PropertyName = "AgeInYears", PropertyValue = 50, Operator = PropertyCompareOps.GreaterThan }; var evalRes = propCompareCondition.Evaluate(this.svcProvider, person); Assert.IsTrue(evalRes); }