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)); }
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(); }