Examples of UnsufficientBalanceException


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
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.