コード例 #1
0
        public void RunNameRule_NoDiscount()
        {
            var rule = new NameDiscountRule();

            IPerson rocky = new Employee(1, "Rocky", "Balboa", new List <Dependant>());

            Assert.IsTrue(rule.GetDiscount(rocky) == 0.0m);
        }
コード例 #2
0
        public void RunNameRule_HasDiscount()
        {
            var rule = new NameDiscountRule();

            IPerson al = new Employee(1, "Al", "Bundy", new List <Dependant>());

            Assert.IsTrue(rule.GetDiscount(al) > 0.0m);
        }