public void CheckChargeReceiptCalculatesAfternoonCostCorrectly() { //Arrange ChargeReceipt receipt = new ChargeReceipt(); Charge charge1 = new Charge("PM", 2.5M, 180.0f); receipt.Add(charge1); Charge charge2 = new Charge("PM", 2.5M, 180.0f); receipt.Add(charge2); //Act var total = receipt.TotalAfternoonCost; //Assert Assert.AreEqual(total, "£15.00"); }
public void CheckChargeReciptCalculatesGrandTotalCorrectly() { //Arrange ChargeReceipt receipt = new ChargeReceipt(); Charge charge1 = new Charge("AM", 2.0M, 180.0f); receipt.Add(charge1); Charge charge2 = new Charge("PM", 2.5M, 180.0f); receipt.Add(charge2); //Act var total = receipt.GrandTotal; //Assert Assert.AreEqual(total, "£13.50"); }
public void CheckChargeReceiptCalculatesMorningCostCorrectly() { //Arrange ChargeReceipt receipt = new ChargeReceipt(); Charge charge1 = new Charge("AM", 2.0M, 180.0f); receipt.Add(charge1); Charge charge2 = new Charge("AM", 2.0M, 180.0f); receipt.Add(charge2); //Act var total = receipt.TotalMorningCost; //Assert Assert.AreEqual(total, "£12.00"); }