Package org.jboss.test.entity.interfaces

Examples of org.jboss.test.entity.interfaces.UnsetEntityContextHome


    * At this point we check whether unsetEntityContext() gets called.
    * @throws Exception
    */
   public void testUnsetEntityContextCalled() throws Exception
   {
      UnsetEntityContextHome home = (UnsetEntityContextHome)super.getInitialContext().lookup("UnsetEntityContext");
     
      // after this call the counter should be 1
      home.clearUnsetEntityContextCallCounter();
     
      // after this call the counter should be 2
      assertEquals("UnsetEntityContextCallCount", 1, home.getUnsetEntityContextCallCounter());
     
      // after this call the counter should be 3
      assertEquals("UnsetEntityContextCallCount", 2, home.getUnsetEntityContextCallCounter());
     
      // after this call the counter should be 4
      assertEquals("UnsetEntityContextCallCount", 3, home.getUnsetEntityContextCallCounter());     
   }
View Full Code Here


    * for this test), but it seems not?
    * @throws Exception
    */
   public void testBeanReturnedToPool() throws Exception
   {
      UnsetEntityContextHome home = (UnsetEntityContextHome)super.getInitialContext().lookup("UnsetEntityContext");
     
      // after this call the counter should be 1
      home.clearUnsetEntityContextCallCounter();
     
      // after this call the counter should be 2
      assertEquals("UnsetEntityContextCallCount", 1, home.getUnsetEntityContextCallCounter());
     
      UnsetEntityContext bean = home.create("TestBean");
      // after this call the counter should be 3 (the bean should be returned to the pool?)
      bean.remove();
     
      // after this call the counter should be 4
      // TODO - this assertion fails!
View Full Code Here

TOP

Related Classes of org.jboss.test.entity.interfaces.UnsetEntityContextHome

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.