public void DispenseChange_ReturnsAvailableFunds() { AddRandomFunds(); var expectedChange = _transactionHandler.AvailableFunds; var actualChange = _transactionHandler.DispenseChange(); Assert.AreEqual(expectedChange, actualChange); }
private void btnDispenseChange_Click(object sender, EventArgs e) { if (_transactionHandler.AvailableFunds > 0) { var change = _transactionHandler.DispenseChange(); UpdateCurrentPayment(); SetStatus(); MessageBox.Show(change.ToString("C"), "Here's your change. :)"); } }