public string Balance_CorrectPin_ReturnBalance(int balance) { var atm = new Atm(int.MaxValue); atm.BeginSession(1111, 1111, balance, 1); var result = atm.GetBalance(); return(result); }
public void Balance_IncorrectPin_ReturnAccountError() { var atm = new Atm(int.MaxValue); atm.BeginSession(1111, 0, 1, 1); var result = atm.GetBalance(); Assert.AreEqual(result, "ACCOUNT_ERR"); }
public void Withdraw_InsufficientBalance_BalanceUnchanged() { var atm = new Atm(int.MaxValue); atm.BeginSession(1111, 1111, 1, 0); atm.WithdrawCash(1000); Assert.AreEqual(atm.GetBalance(), "1"); }
public void Withdraw_SufficientBalance_BalanceUpdated() { var atm = new Atm(int.MaxValue); atm.BeginSession(0, 0, 1, 0); atm.WithdrawCash(1); var result = atm.GetBalance(); Assert.AreEqual(result, "0"); }