Пример #1
0
        public override List <BusinessRule> GetBrokenRules(CountrySpecificCustomer.CountrySpecificCustomer customer)
        {
            List <BusinessRule> brokenRules = new List <BusinessRule>();

            if (string.IsNullOrEmpty(customer.NickName))
            {
                brokenRules.Add(new BusinessRule("Hungarian customers must have a nickname"));
            }
            return(brokenRules);
        }
Пример #2
0
        public override List <BusinessRule> GetBrokenRules(CountrySpecificCustomer.CountrySpecificCustomer customer)
        {
            List <BusinessRule> brokenRules = new List <BusinessRule>();

            if (string.IsNullOrEmpty(customer.Email))
            {
                brokenRules.Add(new BusinessRule("German Customers must have an email address."));
            }
            return(brokenRules);
        }
Пример #3
0
        public override List <BusinessRule> GetBrokenRules(CountrySpecificCustomer.CountrySpecificCustomer customer)
        {
            List <BusinessRule> brokenRules = new List <BusinessRule>();

            if (customer.Age < 18)
            {
                brokenRules.Add(new BusinessRule("Swedish customers must be at least 18"));
            }

            return(brokenRules);
        }