Package org.jboss.test.microcontainer.beans

Examples of org.jboss.test.microcontainer.beans.POJO.method()


   {
      POJO pojo = (POJO)getBean("POJO1A");
      POJO2 pojo2 = (POJO2)getBean("POJO2");
     
      ScopedFactoryAspect.last = null;
      pojo.method();
      ScopedFactoryAspect a1 = ScopedFactoryAspect.last;
      assertNotNull(a1);
     
      ScopedFactoryAspect.last = null;
      pojo2.method();
View Full Code Here


      ScopedFactoryAspect a2 = ScopedFactoryAspect.last;
      assertNotNull(a2);
      assertNotSame(a1, a2);
     
      ScopedFactoryAspect.last = null;
      pojo.method(3);
      ScopedFactoryAspect a3 = ScopedFactoryAspect.last;
      assertNotNull(a3);
      assertSame(a1, a3);
   }
}
View Full Code Here

   public void testIntercepted() throws Exception
   {
      TestAspect.invoked = false;
      POJO pojo = (POJO)getBean("Bean");
      int ret = pojo.method(2);
      assertEquals(4, ret);
      assertTrue(TestAspect.invoked);
   }
  
}
View Full Code Here

   public void testIntercepted() throws Exception
   {
      TestAspect.invoked = false;
      TestInterceptor.invoked = false;
      POJO pojo = (POJO)getBean("Bean");
      int ret = pojo.method(2);
      assertEquals(4, ret);
      assertTrue(TestAspect.invoked);
      assertTrue(TestInterceptor.invoked);
   }
View Full Code Here

   public void testIntercepted() throws Exception
   {
      TestAspect.invoked = false;
      POJO pojo = (POJO)getBean("Bean");
      pojo.method(2);
      assertFalse(TestAspect.invoked);
     
      pojo.method();
      assertTrue(TestAspect.invoked);
   }
View Full Code Here

      TestAspect.invoked = false;
      POJO pojo = (POJO)getBean("Bean");
      pojo.method(2);
      assertFalse(TestAspect.invoked);
     
      pojo.method();
      assertTrue(TestAspect.invoked);
   }

}
View Full Code Here

            validate();
            POJO pojo = (POJO) getBean("Intercepted");
            assertNotNull(pojo);
            TestAspectWithDependency.invoked = null;
            TestInterceptor.invoked = false;
            pojo.method(2);
            assertNotNull(TestAspectWithDependency.invoked);
            assertTrue(dependency == TestAspectWithDependency.invoked);
            assertTrue(TestInterceptor.invoked);
         }
         finally
View Full Code Here

            assertNotNull(dependency);
            pojo = (POJO) getBean("Intercepted");
            assertNotNull(pojo);
            TestAspectWithDependency.invoked = null;
            TestInterceptor.invoked = false;
            pojo.method(2);
            assertTrue(dependency == TestAspectWithDependency.invoked);
            assertTrue(TestInterceptor.invoked);
         }
         finally
         {
View Full Code Here

            assertNotNull(dependency);
            pojo = (POJO) getBean("Intercepted");
            assertNotNull(pojo);
            TestAspectWithDependency.invoked = null;
            TestInterceptor.invoked = false;
            pojo.method(2);
            assertTrue(dependency == TestAspectWithDependency.invoked);
            assertTrue(TestInterceptor.invoked);
         }
         finally
         {
View Full Code Here

            assertNotNull(dependency);
            pojo = (POJO) getBean("Intercepted");
            assertNotNull(pojo);
            int called = TestAspectWithDependency.called;
            TestInterceptor.invoked = false;
            pojo.method(2);
            assertTrue("Interceptor was not rebound", called + 1 == TestAspectWithDependency.called);
            assertTrue("Should not be caching the interceptor/dependency across rebinding", dependency == TestAspectWithDependency.invoked);
            assertTrue(TestInterceptor.invoked);
         }
         finally
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.