Ejemplo n.º 1
0
        public void TestCalculateCustomerTotal()
        {
            // Create instance to take test data
            ClassforAllTestData objPromotionEngineTestDataClass = new ClassforAllTestData();
            List <CustomerCart> objCustomerCartList             = objPromotionEngineTestDataClass.CustomerOrderData();
            ICustomerTotal      objCalculateTotalEngine         = new EngineToCalculateTotal();

            Assert.Equal(370, objCalculateTotalEngine.CalculateCustomerTotal(objCustomerCartList));
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            double CustomerTotal;

            // Create instance to take test data
            ClassforAllTestData objPromotionEngineTestDataClass = new ClassforAllTestData();
            List <CustomerCart> objCustomerCartList             = objPromotionEngineTestDataClass.CustomerOrderData();

            // Important method to calculate customer Total
            ICustomerTotal objCalculateTotalEngine = new EngineToCalculateTotal();

            CustomerTotal = objCalculateTotalEngine.CalculateCustomerTotal(objCustomerCartList);

            Console.WriteLine("CustomerTotal: " + CustomerTotal);

            Console.ReadLine();
        }