public void RoundTip_Total49_36TipPercent18_GrandTotal176() { var myCalculatorViewModel = new CalculatorPageViewModel(myCalculator, myTipCalcTransaction, myTipDatabase) { TotalTxt = "149.36", TipPercent = 18 }; myCalculatorViewModel.RoundTotal(); Assert.AreEqual("176.00", myCalculatorViewModel.GrandTotalTxt); Assert.AreEqual("26.64", myCalculatorViewModel.TipTxt); }
public void RoundTipThenUnRoundTip_Total49_36TipPercent15_GrandTotal171_76() { var myCalculatorViewModel = new CalculatorPageViewModel(myCalculator, myTipCalcTransaction, myTipDatabase) { TotalTxt = "149.36", TipPercent = 15 }; myCalculatorViewModel.RoundTotal(); myCalculatorViewModel.UnRoundTotal(); Assert.AreEqual("171.76", myCalculatorViewModel.GrandTotalTxt); Assert.AreEqual("22.40", myCalculatorViewModel.TipTxt); }