@Test public void withdrawCompleteAmountPasses() { BankAccount anyAccount = new BankAccount(1); boolean withdrawOk = anyAccount.withdraw(1L); assertThat(withdrawOk, is(true)); }
public boolean withdraw(Long money) { long balance = amount - money; if (balance > 0 || balance == 0) { amount = balance; return true; }else { return false; } }
BankAccount { public boolean withdraw(Long money) { long balance = amount - money; if (balance > 0 || balance == 0) { amount = balance; return true; }else { return false; } } }
BankAccount { public boolean withdraw(Long money) { long balance = amount - money; if (balance > 0 || balance == 0) { amount = balance; return true; }else { return false; } } BankAccount(long amount); }
BankAccount { public boolean withdraw(Long money) { long balance = amount - money; if (balance > 0 || balance == 0) { amount = balance; return true; }else { return false; } } BankAccount(long amount); boolean withdraw(Long money); }
BankAccount { public boolean withdraw(Long money) { long balance = amount - money; if (balance > 0 || balance == 0) { amount = balance; return true; }else { return false; } } BankAccount(long amount); boolean withdraw(Long money);  }