Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }