public float ShippingFeeTest(float orderAmount) { var item1 = new Item() { Quantity = 1, UnitPrice = orderAmount }; var list = new List <Item>(); list.Add(item1); var result = ProductsController.CalculateTotal(list); return(result); }
public float totalOrderAmountCalculationTest(int quantityItem1, float priceItem1, int quantityItem2, float priceItem2) { var item1 = new Item() { Quantity = quantityItem1, UnitPrice = priceItem1 }; var item2 = new Item() { Quantity = quantityItem2, UnitPrice = priceItem2 }; var list = new List <Item> (); list.Add(item1); list.Add(item2); var result = ProductsController.CalculateTotal(list); return(result); }