Example #1
0
 @Test
 public void checkAccountActivityWithdrawal() {
   Account a = new Account(Account.CHECKING);
   a.deposit(10);
   a.withdraw(5);
   assertFalse(a.accountInactive());
 }
Example #2
0
  @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);
  }
Example #3
0
 @Test(expected = IllegalArgumentException.class)
 public void testWithdrawIllegalArgumentException() {
   Account a = new Account(Account.SAVINGS);
   a.withdraw(-2);
 }