Esempio n. 1
0
        public void CheckRulesTest()
        {
            UserBR                target = CreateNewUserBR();
            User                  user   = CreateNewUserObject();
            RuleFunctionSEnum     fnName = RuleFunctionSEnum.Insert;
            BusinessRuleErrorList errors = new BusinessRuleErrorList();

            target.CheckRules(user, fnName, errors);
            Assert.IsTrue(errors.Count > 5);
        }
Esempio n. 2
0
        public void CheckRulesTest2()
        {
            UserBR target = CreateNewUserBR();

            User user = CreateNewUserObject();

            user.Email    = "*****@*****.**";
            user.UserName = "******";

            RuleFunctionSEnum     fnName = RuleFunctionSEnum.Insert;
            BusinessRuleErrorList errors = new BusinessRuleErrorList();

            target.CheckRules(user, fnName, errors);
            Assert.IsTrue(errors.Count > 3);
        }