From 8d27878672e9fbae28c6ce160904a781c5e8b523 Mon Sep 17 00:00:00 2001 From: Aaron Goff Date: Mon, 2 Dec 2019 15:47:00 -0500 Subject: [PATCH] Add missing method and bracket --- chapter4/bankService/SavingsAccountTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chapter4/bankService/SavingsAccountTest.java b/chapter4/bankService/SavingsAccountTest.java index e16b4dc..b3ec345 100644 --- a/chapter4/bankService/SavingsAccountTest.java +++ b/chapter4/bankService/SavingsAccountTest.java @@ -56,3 +56,12 @@ private Object[][] createValidWithdrawData() { */ @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); + } + } +}