public void Refund(int currentTotal, int?priceInCents) { var calculator = new RefundCalculator(); var refund = calculator.CalculateRefund(priceInCents ?? 0, currentTotal); foreach (var coinCount in refund) { ReturnTray.AddRange(Enumerable.Repeat(coinCount.Key, coinCount.Value)); } }
public void RefundCalculator_ZeroBalance_ReturnsZero() { var actual = _refunder.CalculateRefund(50, 50); AssertRefund(actual, nickels: 0, dimes: 0, quarters: 0); }