Exemple #1
0
        public void CalculateDiscount_IfItemsNotEmptyOrNull_ShouldCalculateDiscount()
        {
            //arrange
            var expected     = 0.20M;
            var orchestrator = new DiscountOrchestrator();
            //act
            var actual = orchestrator.CalculateDiscount(ItemsList(), GetOffer());

            //assert
            actual.Should().Be(expected);
        }
Exemple #2
0
        public void CalculateDiscount_IfItemsEmpty_ShouldReturnZero()
        {
            //arrange
            var expected     = 0.0m;
            var orchestrator = new DiscountOrchestrator();
            //act
            var actual = orchestrator.CalculateDiscount(new List <Item>(), GetOffer());

            //assert
            actual.Should().Be(expected);
        }