Package Banking

Examples of Banking.SavingsAccount.deposit()


  }

  @Test
  public void payInterest() throws BankException {
    SavingsAccount firstAccount = bank.createSavingsAccount(accountNumberOne, interestRate*2);
    firstAccount.deposit(depositAmount);
   
    SavingsAccount secondAccount = bank.createSavingsAccount(accountNumberTwo, interestRate);
    secondAccount.deposit(depositAmount*2);
   
    bank.payInterest();
 
View Full Code Here


  public void payInterest() throws BankException {
    SavingsAccount firstAccount = bank.createSavingsAccount(accountNumberOne, interestRate*2);
    firstAccount.deposit(depositAmount);
   
    SavingsAccount secondAccount = bank.createSavingsAccount(accountNumberTwo, interestRate);
    secondAccount.deposit(depositAmount*2);
   
    bank.payInterest();
    assertEquals((int)(depositAmount*(1+(interestRate*2))), firstAccount.balance());
    assertEquals((int)(depositAmount*2*(1+interestRate)), secondAccount.balance());
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.