示例#1
0
        public void RulesTests_DebitCardAccountRule_PassesFor_GoldBundle()
        {
            var bundle = new GoldBundle().GetDefault;

            var rule = new DebitCardAccountRule();

            var result = rule.Execute(bundle);

            Assert.IsTrue(result);
        }
示例#2
0
        public void RulesTests_DebitCardAccountRule_FailsFor_JuniorSaverBundle()
        {
            var bundle = new JuniorSaverBundle().GetDefault;

            var rule = new DebitCardAccountRule();

            var result = rule.Execute(bundle);

            Assert.IsFalse(result);
        }
示例#3
0
        public void RulesTests_DebitCardAccountRule_HandlesNoAccount()
        {
            var bundle = new GoldBundle().GetDefault;

            bundle.Products = new List <Product>();

            var rule = new DebitCardAccountRule();

            var result = rule.Execute(bundle);

            Assert.IsFalse(result);
        }
示例#4
0
        public void RulesTests_DebitCardAccountRule_PassesFor_GoldBundleWithPensionerAccount()
        {
            var bundle = new GoldBundle().GetDefault;

            bundle.Products = new List <Product> {
                new PensionerAccount()
            };

            var rule = new DebitCardAccountRule();

            var result = rule.Execute(bundle);

            Assert.IsTrue(result);
        }