@Test public void checkAccountActivityWithdrawal() { Account a = new Account(Account.CHECKING); a.deposit(10); a.withdraw(5); assertFalse(a.accountInactive()); }
@Test public void testTransactions() { Account a = new Account(Account.SAVINGS); a.deposit(100.5); a.withdraw(50.5); double balance = a.sumTransactions(); assertEquals(50.0, balance, DOUBLE_DELTA); }
@Test(expected = IllegalArgumentException.class) public void testWithdrawIllegalArgumentException() { Account a = new Account(Account.SAVINGS); a.withdraw(-2); }