Package Banking

Examples of Banking.CurrentAccount


    account.close();
    accounts.remove(accountNumber);
  }

  public CurrentAccount createCurrentAccount(String accountNumber, int loanLimit) throws BankException {
    CurrentAccount account = null;

    if (internal_findAccount(accountNumber) != null) {
      LOG.warn(MSG_ACCOUNT_ALREADYCREATED + accountNumber);
      throw new BankException(MSG_ACCOUNT_ALREADYCREATED + accountNumber);
    }
View Full Code Here


 
  // test cases

  @Test
  public void createCurrentAccount() throws BankException {
    CurrentAccount account = bank.createCurrentAccount(accountNumberOne, loanLimit);
    assertNotNull(account);
    assertEquals(accountNumberOne, account.accountNumber());
    assertEquals(loanLimit, account.loanLimit());
   
    Account foundAccount = bank.findAccount(accountNumberOne);
    assertEquals(true, CompareAccounts.compareAccounts(account, foundAccount));
  }
View Full Code Here

        Bank bank = BankHelper.narrow(namingCtx.resolve_str(bankname));

        System.out.println("Obtained a handle on server object: " + bank);
       
        String accNum = "0234.234432.50L";
        CurrentAccount currentAccount = bank.createCurrentAccount(accNum, 123);
       
        int i = currentAccount.loanLimit();
        System.out.println("loanlimit: " + i);
        System.out.print(currentAccount.accountNumber());
        currentAccount.deposit(100);
       
        bank.payInterest();

        System.out.print(currentAccount.balance());

        //        currentAccount.deposit(100);
//        System.out.println("yeeeee: " + currentAccount.balance());
       
  }
View Full Code Here

TOP

Related Classes of Banking.CurrentAccount

Copyright © 2018 www.massapicom. 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.