public void CalculatePayment_ReturnZero_WithEmptyCrat() { //Fixture setup var shoppingCart = GetShoppingCartWithNoItems(); calculatePayment payment = new calculatePayment(shoppingCart); //Exercise system var actual = payment.payment(); //verify outcome Assert.AreEqual(actual, 0); }
public void ExchangeCurrency_ReturnPaymentInSpecifiedCurrency(string currency, double expected) { //Fixture setup var shoppingCart = GetShoppingCartWithSpecificCurrency(currency); calculatePayment calPayment = new calculatePayment(shoppingCart); //Exercise system var actual = calPayment.payment(); //verify outcome Assert.AreEqual(actual, expected); }
public void CalculatPayment_ReturnCorrectResult_WithOneItem(double price, double taxe, double discount, int quantity, double expected) { //Fixture setup var shoppingCart = GetShoppingCartWithOneItem(price, taxe, discount, quantity); shoppingCart.AddDiscount(new discount(shopping_cart.DiscountType.perItem, 0.0)); calculatePayment calPayment = new calculatePayment(shoppingCart); //Exercise system var actual = calPayment.payment(); //verify outcome Assert.AreEqual(actual, expected); }