Package org.jboss.test.microcontainer.beans

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


   {
      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 testDifferentInstances() throws Exception
   {
      POJO pojo = (POJO)getBean("Intercepted");
     
      TestAspectWithProperty.last = null;
      pojo.method();
      TestAspectWithProperty a1 = TestAspectWithProperty.last;
      assertNotNull(a1);
      assertEquals("PropertyA", a1.getSomeProperty());
     
      TestAspectWithProperty.last = null;
View Full Code Here

      TestAspectWithProperty a1 = TestAspectWithProperty.last;
      assertNotNull(a1);
      assertEquals("PropertyA", a1.getSomeProperty());
     
      TestAspectWithProperty.last = null;
      pojo.method(2);
      TestAspectWithProperty a2 = TestAspectWithProperty.last;
      assertNotNull(a2);
      assertEquals("PropertyB", a2.getSomeProperty());
     
      assertNotSame(a1, a2);
View Full Code Here

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

            validate();
            Dependency dependency = (Dependency) getBean("Dependency");
            assertNotNull(dependency);
            pojo = (POJO) getBean("Intercepted");
            assertNotNull(pojo);
            pojo.method(2);
            assertTrue(dependency == TestAspectWithDependency.invoked);
         }
         finally
         {
            undeploy(getFile0());
View Full Code Here

            validate();
            Dependency dependency = (Dependency) getBean("Dependency");
            assertNotNull(dependency);
            pojo = (POJO) getBean("Intercepted");
            assertNotNull(pojo);
            pojo.method(2);
            assertTrue(dependency == TestAspectWithDependency.invoked);
         }
         finally
         {
            undeploy(getFile0());
View Full Code Here

            Dependency dependency = (Dependency) getBean("Dependency");
            assertNotNull(dependency);
            pojo = (POJO) getBean("Intercepted");
            assertNotNull(pojo);
            int called = TestAspectWithDependency.called;
            pojo.method(2);
            assertEquals("Interceptor was not rebound", called + 1, TestAspectWithDependency.called);
            assertTrue("Should not be caching the interceptor/dependency across rebinding", dependency == TestAspectWithDependency.invoked);
         }
         finally
         {
View Full Code Here

         try
         {
            validate();
            POJO pojo = (POJO) getBean("Intercepted");
            assertNotNull(pojo);
            pojo.method(2);
            assertTrue(dependency == TestAspectWithDependency.invoked);
         }
         finally
         {
            undeploy(getFile1());
View Full Code Here

         deploy(getFile1());
         try
         {
            POJO pojo = (POJO) getBean("Intercepted");
            assertNotNull(pojo);
            pojo.method(2);
            assertTrue(dependency == TestAspectWithDependency.invoked);
         }
         finally
         {
            undeploy(getFile1());
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.