Package org.jboss.test.ejb3.nointerface

Examples of org.jboss.test.ejb3.nointerface.AccountManager.credit()


      AccountManager accountMgr = (AccountManager) ctx.lookup(AccountManagerBean.JNDI_NAME);
     
      long dummyAccountNumber = 123;
      // credit 50 dollars (Note that the current balance is hard coded in the bean to 100)
      // so after crediting, the current balance is going to be 150
      int currentBalance = accountMgr.credit(dummyAccountNumber, 50);
     
      assertEquals("Unexpected account balance after credit", 150, currentBalance);
     
      // now let's debit 10 dollars (Note that the current balance is again hard coded in the bean to 100).
      // So after debiting, the current balance is going to be 90
View Full Code Here


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

      // credit
      accountManager.credit(100);

      AccountManager anotherAccountManagerInstance = (AccountManager) this.getInitialContext().lookup(
            AccountManagerBean.JNDI_NAME);
      int balanceAfterCredit = anotherAccountManagerInstance.balance();
      assertEquals("Unexpected balance after credit", 100, balanceAfterCredit);
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.