Package com.excilys.ebi.bank.service

Examples of com.excilys.ebi.bank.service.UnsufficientBalanceException


    Account debitedAccount = accountDao.findOne(debitedAccountId);
    notNull(debitedAccount, "account with number {} not found", debitedAccount);

    if (debitedAccount.getBalance().compareTo(amount) < 0) {
      throw new UnsufficientBalanceException();
    }

    Account creditedAccount = accountDao.findOne(creditedAccountId);
    notNull(creditedAccount, "account with number {} not found", creditedAccount);
View Full Code Here

TOP

Related Classes of com.excilys.ebi.bank.service.UnsufficientBalanceException

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.