Пример #1
0
        public void Check_If_Rule1_works_when_not_applicable()
        {
            List <char> mycart = new List <char>();

            mycart.Add('A');
            mycart.Add('A');

            PromotionMain.Rules.IRule rule1 = new PromotionMain.Rules.Rule1('A', 3, 0);
            Assert.False(rule1.IsApplicable(mycart));
        }
Пример #2
0
        public void Check_If_Rule1_works_when_applicable_with_multiple_skus()
        {
            List <char> mycart = new List <char>();

            mycart.Add('B');
            mycart.Add('C');
            mycart.Add('D');
            mycart.Add('A');
            mycart.Add('A');
            mycart.Add('A');

            PromotionMain.Rules.IRule rule1 = new PromotionMain.Rules.Rule1('A', 3, 0);
            Assert.True(rule1.IsApplicable(mycart));
        }