Open arquillos opened 5 years ago
This was added to chapter5/bankService/SavingsAccountTest.java
in #2 but not to chapter4/bankService/SavingsAccountTest.java
.
/**
* Customers should not be able to withdraw more than their available savings account balance
* Scenario:
* 1. Given a customer's savings account with an initial balance of $100.00
* 2. When I attempt to withdraw $200.00
* 3. Then an exception should occur indicating that there are insufficient funds in the account
* 4. And the account balance should remain unchanged.
*/
@Test
public void withdrawingAmountGreaterThanBalance_Throws_InsufficientFundsException() throws InsufficientFundsException {
try {
savings.withdraw(200.00);
fail("Expected Insufficient Funds Exception but none is thrown");
} catch (InsufficientFundsException e){
// Then
assertEquals(savings.getBalance(), 100.00);
}
}
}
The file: SavingsAccountTest.java is not complete. The last test method is not "done":
`/**