private void CalcTipPercentage() { _calculator.CalcTipPercentage(); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("TipPercent")); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("TipPercentTxt")); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("GrandTotalTxt")); }
public void CalculateTipPercentageTwentyFivePercent() { var tipCalculator = new TipCalculator { Total = 10, Tip = 2.50 }; tipCalculator.CalcTipPercentage(); Assert.AreEqual(tipCalculator.TipPercent, 25); }
public void CalculateTipPercentageTenPercent() { var tipCalculator = new TipCalculator { Total = 10, Tip = 1 }; tipCalculator.CalcTipPercentage(); Assert.AreEqual(tipCalculator.TipPercent, 10); }