Examples of balance()


Examples of org.gestern.gringotts.Account.balance()

        if(account.balance() >= amount && account.remove(amount)) {
            //We has mulah!
            return new EconomyResponse(amount, account.balance(), ResponseType.SUCCESS, null);
        } else {
            //Not enough money to withdraw this much.
            return new EconomyResponse(0, account.balance(), ResponseType.FAILURE, "Insufficient funds");
        }

    }

    @Override
View Full Code Here

Examples of org.gestern.gringotts.Account.balance()

        }

        Account account = gringotts.accounting.getAccount( accountHolder );

        if (account.add(amount)) {  
            return new EconomyResponse( amount, account.balance(), ResponseType.SUCCESS, null);
        } else {
            return new EconomyResponse( 0, account.balance(), ResponseType.FAILURE, "Not enough capacity to store that amount!");
        }
    }
View Full Code Here

Examples of org.gestern.gringotts.Account.balance()

        Account account = gringotts.accounting.getAccount( accountHolder );

        if (account.add(amount)) {  
            return new EconomyResponse( amount, account.balance(), ResponseType.SUCCESS, null);
        } else {
            return new EconomyResponse( 0, account.balance(), ResponseType.FAILURE, "Not enough capacity to store that amount!");
        }
    }

    @Override
    public EconomyResponse createBank(String name, String player) {
View Full Code Here

Examples of org.jboss.test.ejb3.singleton.AccountManager.balance()

   public void testSingletonBeanAccess() throws Exception
   {
      AccountManager accountManager = (AccountManager) this.getInitialContext().lookup(AccountManagerBean.JNDI_NAME);

      int initialBalance = accountManager.balance();
      assertEquals("Unexpected initial balance", 0, initialBalance);

      // credit
      accountManager.credit(100);
View Full Code Here

Examples of org.jboss.test.ejb3.singleton.AccountManager.balance()

      // credit
      accountManager.credit(100);

      AccountManager anotherAccountManagerInstance = (AccountManager) this.getInitialContext().lookup(
            AccountManagerBean.JNDI_NAME);
      int balanceAfterCredit = anotherAccountManagerInstance.balance();
      assertEquals("Unexpected balance after credit", 100, balanceAfterCredit);

      // debit
      anotherAccountManagerInstance.debit(50);
View Full Code Here

Examples of vs.example.Account.balance()

          if(account == null)
            System.out.println("\tno such account");
          else
          {
            try{
              long balance = account.balance();
              System.out.println("\tbalance: "+balance);
            }catch(SimpleRpcException e)
            {
              System.out.println("\t "+e.getMessage());
            }
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.