Ejemplo n.º 1
0
        public void It_applies_to_five_milks_and_a_butter()
        {
            var items = new Collection <IPurchaseable> {
                new Butter(), new Milk(), new Milk(), new Milk(), new Milk(), new Milk()
            };
            var unit = new MultibuyMilkDeal();

            Assert.That(unit.TimesEligible(items), Is.EqualTo(1));
        }
Ejemplo n.º 2
0
        public void It_does_not_apply_to_three_milks()
        {
            var items = new Collection <IPurchaseable> {
                new Milk(), new Milk(), new Milk()
            };
            var unit = new MultibuyMilkDeal();

            Assert.That(unit.TimesEligible(items), Is.EqualTo(0));
        }