public void GivenFindWhenNoMatchingPromotionFoundThenReturnNull() { var sut = new PromotionProvider(); var promotion = sut.Find(new CartItem(new Item() { Sku = "Random" }, 2)); promotion.Should().BeNull(); }
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>(); }