Example #1
0
        public void ActivityDTO_GetRuleSet_OnFieldValue_ReturnTwoRules()
        {
            //------------Setup for test--------------------------
            var activityDto = new ActivityDTO {
                FieldName = "[[a]]", FieldValue = "[[b]]"
            };
            //------------Execute Test---------------------------
            var rulesSet = activityDto.GetRuleSet("FieldValue", "");

            //------------Assert Results-------------------------
            Assert.IsNotNull(rulesSet);
            Assert.AreEqual(1, rulesSet.Rules.Count);
            Assert.IsInstanceOfType(rulesSet.Rules[0], typeof(IsValidExpressionRule));
        }
Example #2
0
 public void ActivityDTO_GetRuleSet_OnFieldValue_ReturnTwoRules()
 {
     //------------Setup for test--------------------------
     var activityDto = new ActivityDTO { FieldName = "[[a]]", FieldValue = "[[b]]" };
     //------------Execute Test---------------------------
     var rulesSet = activityDto.GetRuleSet("FieldValue", "");
     //------------Assert Results-------------------------
     Assert.IsNotNull(rulesSet);
     Assert.AreEqual(1, rulesSet.Rules.Count);
     Assert.IsInstanceOfType(rulesSet.Rules[0], typeof(IsValidExpressionRule));
 }