예제 #1
0
        public void GivenSingleProductWitDifferentSpecialShouldGiveMinPrice()
        {
            var    trolleyCalculator = new TrolleyCalculatorService();
            Action action            = () => trolleyCalculator.CalculateTotal(DifferentSpecial());

            action.Should().Throw <ValidationException>();
        }
예제 #2
0
        public void GivenTwoProductWitMultipleSpecialShouldGiveMinPrice()
        {
            var trolleyCalculator = new TrolleyCalculatorService();
            var result            = trolleyCalculator.CalculateTotal(TwoProductWithMultipleSpecial());

            result.Should().Be(7);
        }
예제 #3
0
        public void GivenSingleProductWithSpecialShouldGiveMinPrice()
        {
            var trolleyCalculator = new TrolleyCalculatorService();
            var result            = trolleyCalculator.CalculateTotal(SingleItemWithSpecial());

            result.Should().Be(4);
        }