Package org.jboss.test.microcontainer.beans

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


      TestAspect.invoked = false;
      SimpleFactoryAspect.invoked = 0;
      TestInterceptor.invoked = false;
      SimpleFactoryInterceptor.invoked = 0;
      POJO pojo = (POJO)getBean("Bean");
      int ret = pojo.method(2);
      assertEquals(4, ret);
      assertTrue(SimpleFactoryAspect.invoked == 100);
      assertTrue(TestAspect.invoked);
      assertTrue(SimpleFactoryInterceptor.invoked == 100);
      assertTrue(TestInterceptor.invoked);
View Full Code Here


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

      TestAspect.invoked = false;
      pojo.method();
      assertFalse(TestAspect.invoked);
  
      DynamicCFlowImpl.execute = true;
      pojo.method();
      assertTrue(TestAspect.invoked);
   }

}
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

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

   public void testIntercepted() throws Exception
   {
      Interceptions.reset();
      POJO pojo = (POJO)getBean("Bean");
      pojo.method(2);
     
      List<Object> interceptions = Interceptions.interceptions();
      assertEquals(2, interceptions.size());
     
      assertEquals(TestInterceptor.class, interceptions.get(0).getClass());
View Full Code Here

         {
            deploy(getFile1());
           
            DependencyFactoryAspect.invoked = null;
            POJO pojo = (POJO)getBean("Bean");
            int ret = pojo.method(2);
            assertEquals(4, ret);
            POJO dep = (POJO)getBean("Dependency");
            assertSame(dep, DependencyFactoryAspect.invoked);
         }
         finally
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(SimpleFactoryInterceptor.invoked == 100);
   }

}
View Full Code Here

  
   public void testPropertyReplacement()
   {
      AnnotationWithValueAspect.value = null;
      POJO pojo = (POJO)getBean("Bean");
      pojo.method(2);
      assertNull(AnnotationWithValueAspect.value);
     
      pojo.method();
      assertNotNull(AnnotationWithValueAspect.value);
      assertEquals(100, AnnotationWithValueAspect.value.integer());
View Full Code Here

      AnnotationWithValueAspect.value = null;
      POJO pojo = (POJO)getBean("Bean");
      pojo.method(2);
      assertNull(AnnotationWithValueAspect.value);
     
      pojo.method();
      assertNotNull(AnnotationWithValueAspect.value);
      assertEquals(100, AnnotationWithValueAspect.value.integer());
   }

  
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.