Package org.jboss.test.microcontainer.beans

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


   {
      POJO pojo1 = (POJO) getBean("Intercepted1");
      assertNotNull(pojo1);
      TestAspectWithDependency.invoked = null;
      TestInterceptorWithDependency.invoked = null;
      pojo1.method(2);
      assertNotNull(TestAspectWithDependency.invoked);
      assertTrue(dependency1 == TestAspectWithDependency.invoked);
      assertNull(TestInterceptorWithDependency.invoked);
   }
View Full Code Here


   {
      POJO pojo2 = (POJO) getBean("Intercepted2");
      assertNotNull(pojo2);
      TestAspectWithDependency.invoked = null;
      TestInterceptorWithDependency.invoked = null;
      pojo2.method(2);
      assertNull(TestAspectWithDependency.invoked);
      assertNotNull(TestInterceptorWithDependency.invoked);
      System.out.println(TestInterceptorWithDependency.invoked);
      assertTrue(dependency2 == TestInterceptorWithDependency.invoked);
   }
View Full Code Here

   {
      POJO pojo3 = (POJO) getBean("Intercepted3");
      assertNotNull(pojo3);
      TestAspectWithDependency.invoked = null;
      TestInterceptorWithDependency.invoked = null;
      pojo3.method(2);
      assertNotNull(TestAspectWithDependency.invoked);
      assertTrue(dependency1 == TestAspectWithDependency.invoked);
      assertNotNull(TestInterceptorWithDependency.invoked);
      assertTrue(dependency2 == TestInterceptorWithDependency.invoked);
   }
View Full Code Here

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

   public void testIntroduced() throws Exception
   {
      TestAspect.invoked = false;
      POJO pojo = (POJO)getBean("Bean");
      assertTrue(pojo instanceof IntroductionInterface);
      pojo.method();
      assertTrue(TestAspect.invoked);
   }

}
View Full Code Here

      TestAspect.invoked = false;
      TestInterceptor.invoked = false;
      TestAspectWithProperty.last = null;
      POJO pojo = (POJO)createProxy("AOPDomain", new POJO());
      assertNotNull(pojo);
      pojo.method();
      assertNotNull(TestAspectWithProperty.last);
      assertEquals("This is only a test", TestAspectWithProperty.last.getSomeProperty());
      assertTrue(TestInterceptor.invoked);
      assertTrue(TestAspect.invoked);
View Full Code Here

      TestInterceptor.invoked = false;
      TestAspectWithProperty.last = null;
      TestAspect.invoked = false;
      POJO pojo = (POJO)createProxy(new POJO());
      assertNotNull(pojo);
      pojo.method();
      assertNull(TestAspectWithProperty.last);
      assertFalse(TestInterceptor.invoked);
      assertFalse(TestAspect.invoked);

      AspectManager manager = getMainAspectManager();
View Full Code Here

      pojoA.method(1);
      ScopedFactoryAspect a2 = ScopedFactoryAspect.last;
      assertNotNull(a2);
     
      ScopedFactoryAspect.last = null;     
      pojoB.method();
      ScopedFactoryAspect a3 = ScopedFactoryAspect.last;
      assertNotNull(a3);
     
      ScopedFactoryAspect.last = null;     
      pojoB.method(1);
View Full Code Here

      pojoB.method();
      ScopedFactoryAspect a3 = ScopedFactoryAspect.last;
      assertNotNull(a3);
     
      ScopedFactoryAspect.last = null;     
      pojoB.method(1);
      ScopedFactoryAspect a4 = ScopedFactoryAspect.last;
      assertNotNull(a4);
     
      ScopedFactoryAspect.last = null;     
      pojo2.method();
View Full Code Here

   {
      POJO pojo1 = (POJO) getBean("Intercepted1");
      assertNotNull(pojo1);
      TestAspectWithDependency.invoked = null;
      TestInterceptorWithDependency.invoked = null;
      pojo1.method(2);
      assertNotNull(TestAspectWithDependency.invoked);
      assertTrue(dependency1 == TestAspectWithDependency.invoked);
      assertNull(TestInterceptorWithDependency.invoked);
   }
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.