예제 #1
0
        public void GivenFindWhenNoMatchingPromotionFoundThenReturnNull()
        {
            var sut = new PromotionProvider();

            var promotion = sut.Find(new CartItem(new Item()
            {
                Sku = "Random"
            }, 2));

            promotion.Should().BeNull();
        }
예제 #2
0
        public void GivenFindWhenMatchingPromotionFoundThenReturnPromotion()
        {
            var sut = new PromotionProvider();

            var promotion = sut.Find(new CartItem(new Item()
            {
                Sku = "D"
            }, 2));

            promotion.Should().NotBeNull();
            promotion.Should().BeOfType <QuantityForPercentagePromotion>();
        }