public void Test_CalculateTotalToPay_Valid()
        {
            // Arrange
            List<ItemDetails> items = new List<ItemDetails>();
            items.Add(new ItemDetails { Quantity = 5, Price = 10.0m, VAT = 15 });
            items.Add(new ItemDetails { Quantity = 2, Price = 100.0m, VAT = 15 });
            items.Add(new ItemDetails { Quantity = 10, Price = 15.0m, VAT = 15 });

            var orderCalcSvc = new DefaultOrderCalculationService();
            decimal serviceCharge = 100.0m;

            // Act
            var expected = 0.0m;
            foreach (var item in items)
            {
                var total = item.Quantity * item.Price;
                var totalPlusVat = total * (1 + item.VAT / 100);
                expected += totalPlusVat;
            }
            expected += serviceCharge;

            var actual = orderCalcSvc.CalculateTotalToPay(items, serviceCharge);

            // Assert
            Assert.AreEqual(expected, actual);
        }
        public void Test_ProcessOrder_Valid()
        {
            // Arrange
            var orderCalcSvc = new DefaultOrderCalculationService();
            var serviceChargeCalcSvc = new DefaultDeliveryServiceChargeCalculationService();

            var deliveryOrderProcessor = new DeliveryOrderProcessor(
                orderCalcSvc, serviceChargeCalcSvc);

            var deliveryOrder = new DeliveryOrder
            {
                UserId = "this.User",
                From = new DefaultAddress { Address = "My Home" },
                To = new DefaultAddress { Address = "My Office" },
                OrderCart = new OrderDetails
                {
                    PackageList = new List<ItemDetails>()
                    {
                        new ItemDetails
                        {
                            Item = "Coffee",
                            Quantity = 2,
                            Price = 150.0m,
                            VAT = 15.0m
                        }              
                    }                    
                },
                PaymentMethod = "CashOnDelivery"
            };

            // Act
            deliveryOrderProcessor.ProcessOrder(deliveryOrder);
            var coffees = deliveryOrder.OrderCart.PackageList;
            var cart = deliveryOrder.OrderCart;

            var serviceCharge = serviceChargeCalcSvc.CalculateServiceCharge(coffees);
            var subTotal = orderCalcSvc.CalculateSubtotal(coffees);
            var totalToPay = orderCalcSvc.CalculateTotalToPay(coffees, serviceCharge);
            var totalVATAmount = orderCalcSvc.CalculateTotalVATAmount(coffees, serviceCharge);
            var totalWeight = 0;


            // Assert
            Assert.AreEqual(serviceCharge, cart.ServiceCharge);
            Assert.AreEqual(subTotal, cart.SubTotal);
            Assert.AreEqual(totalToPay, cart.TotalToPay);
            Assert.AreEqual(totalVATAmount, cart.TotalVATAmount);
            Assert.AreEqual(totalWeight, cart.TotalWeight);
        }