Package org.jboss.test.microcontainer.beans

Examples of org.jboss.test.microcontainer.beans.POJO2


   public void testPerJoinPoint() throws Exception
   {
      POJO pojoA = (POJO)getBean("POJO1A");
      POJO pojoB = (POJO)getBean("POJO1B");
      POJO2 pojo2 = (POJO2)getBean("POJO2");
  
      ScopedFactoryAspect.last = null;     
      pojoA.method();
      ScopedFactoryAspect a1 = ScopedFactoryAspect.last;
      assertNotNull(a1);
     
      ScopedFactoryAspect.last = null;     
      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);
      ScopedFactoryAspect a4 = ScopedFactoryAspect.last;
      assertNotNull(a4);
     
      ScopedFactoryAspect.last = null;     
      pojo2.method();
      ScopedFactoryAspect a5 = ScopedFactoryAspect.last;
      assertNotNull(a5);
     
      ScopedFactoryAspect.last = null;     
      pojo2.method(1);
      ScopedFactoryAspect a6 = ScopedFactoryAspect.last;
      assertNotNull(a6);
     
      assertNotSame(a1, a2);
      assertNotSame(a1, a3);
View Full Code Here


   }

   public void testPerClass() throws Exception
   {
      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();
      ScopedFactoryAspect a2 = ScopedFactoryAspect.last;
      assertNotNull(a2);
      assertNotSame(a1, a2);
     
      ScopedFactoryAspect.last = null;
View Full Code Here

   public void testPerInstance() throws Exception
   {
      POJO pojoA = (POJO)getBean("POJO1A");
      POJO pojoB = (POJO)getBean("POJO1B");
      POJO2 pojo2 = (POJO2)getBean("POJO2");
     
      ScopedFactoryAspect.last = null;     
      pojoA.method();
      ScopedFactoryAspect a1 = ScopedFactoryAspect.last;
      assertNotNull(a1);
     
      ScopedFactoryAspect.last = null;     
      pojoA.method(2);
      ScopedFactoryAspect a2 = ScopedFactoryAspect.last;
      assertNotNull(a2);
      assertSame(a1, a2);
     
      ScopedFactoryAspect.last = null;     
      pojoB.method();
      ScopedFactoryAspect a3 = ScopedFactoryAspect.last;
      assertNotNull(a3);
      assertNotSame(a3, a2);
     
      ScopedFactoryAspect.last = null;     
      pojoB.method(4);
      ScopedFactoryAspect a4 = ScopedFactoryAspect.last;
      assertNotNull(a4);
      assertSame(a3, a4);
     
      ScopedFactoryAspect.last = null;     
      pojo2.method();
      ScopedFactoryAspect a5 = ScopedFactoryAspect.last;
      assertNotNull(a5);
      assertNotSame(a5, a4);
      assertNotSame(a5, a2);
     
      ScopedFactoryAspect.last = null;     
      pojo2.method(4);
      ScopedFactoryAspect a6 = ScopedFactoryAspect.last;
      assertNotNull(a6);
      assertSame(a5, a6);
   }
View Full Code Here

   }

   public void testPerVm() throws Exception
   {
      POJO pojo = (POJO)getBean("POJO1A");
      POJO2 pojo2 = (POJO2)getBean("POJO2");
  
      PerVmAspect.last = null;
      pojo.method();
      PerVmAspect a1 = PerVmAspect.last;
      assertNotNull(a1);
     
      PerVmAspect.last = null;
      pojo2.method();
      PerVmAspect a2 = PerVmAspect.last;
      assertNotNull(a2);
      assertSame(a1, a2);
     
      PerVmAspect.last = null;
View Full Code Here

   }

   public void testPerClass() throws Exception
   {
      POJO pojo = (POJO)getBean("POJO1A");
      POJO2 pojo2 = (POJO2)getBean("POJO2");
     
      PerClassAspect.last = null;
      pojo.method();
      PerClassAspect a1 = PerClassAspect.last;
      assertNotNull(a1);
     
      PerClassAspect.last = null;
      pojo2.method();
      PerClassAspect a2 = PerClassAspect.last;
      assertNotNull(a2);
      assertNotSame(a1, a2);
     
      PerClassAspect.last = null;
View Full Code Here

   public void testPerInstance() throws Exception
   {
      POJO pojoA = (POJO)getBean("POJO1A");
      POJO pojoB = (POJO)getBean("POJO1B");
      POJO2 pojo2 = (POJO2)getBean("POJO2");
     
      PerInstanceAspect.last = null;
      pojoA.method();
      PerInstanceAspect a1 = PerInstanceAspect.last;
      assertNotNull(a1);
     
      PerInstanceAspect.last = null;
      pojoA.method(2);
      PerInstanceAspect a2 = PerInstanceAspect.last;
      assertNotNull(a2);
      assertSame(a1, a2);
     
      PerInstanceAspect.last = null;
      pojoB.method();
      PerInstanceAspect a3 = PerInstanceAspect.last;
      assertNotNull(a3);
      assertNotSame(a3, a2);
     
      PerInstanceAspect.last = null;
      pojoB.method(4);
      PerInstanceAspect a4 = PerInstanceAspect.last;
      assertNotNull(a4);
      assertSame(a3, a4);
     
      PerInstanceAspect.last = null;
      pojo2.method();
      PerInstanceAspect a5 = PerInstanceAspect.last;
      assertNotNull(a5);
      assertNotSame(a5, a4);
      assertNotSame(a5, a2);
     
      PerInstanceAspect.last = null;
      pojo2.method(4);
      PerInstanceAspect a6 = PerInstanceAspect.last;
      assertNotNull(a6);
      assertSame(a5, a6);
   }
View Full Code Here

   public void testPerJoinPoint() throws Exception
   {
      POJO pojoA = (POJO)getBean("POJO1A");
      POJO pojoB = (POJO)getBean("POJO1B");
      POJO2 pojo2 = (POJO2)getBean("POJO2");
  
      PerJoinPointAspect.last = null;
      pojoA.method();
      PerJoinPointAspect a1 = PerJoinPointAspect.last;
      assertNotNull(a1);
     
      PerJoinPointAspect.last = null;
      pojoA.method(1);
      PerJoinPointAspect a2 = PerJoinPointAspect.last;
      assertNotNull(a2);
     
      PerJoinPointAspect.last = null;
      pojoB.method();
      PerJoinPointAspect a3 = PerJoinPointAspect.last;
      assertNotNull(a3);
     
      PerJoinPointAspect.last = null;
      pojoB.method(1);
      PerJoinPointAspect a4 = PerJoinPointAspect.last;
      assertNotNull(a4);
     
      PerJoinPointAspect.last = null;
      pojo2.method();
      PerJoinPointAspect a5 = PerJoinPointAspect.last;
      assertNotNull(a5);
     
      PerJoinPointAspect.last = null;
      pojo2.method(1);
      PerJoinPointAspect a6 = PerJoinPointAspect.last;
      assertNotNull(a6);
     
      assertNotSame(a1, a2);
      assertNotSame(a1, a3);
View Full Code Here

   }

   public void testPerVm() throws Exception
   {
      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();
      ScopedFactoryAspect a2 = ScopedFactoryAspect.last;
      assertNotNull(a2);
      assertSame(a1, a2);
     
      ScopedFactoryAspect.last = null;
View Full Code Here

   public void testPerClassJoinPoint() throws Exception
   {
      POJO pojoA = (POJO)getBean("POJO1A");
      POJO pojoB = (POJO)getBean("POJO1B");
      POJO2 pojo2 = (POJO2)getBean("POJO2");
  
      ScopedFactoryAspect.last = null;     
      pojoA.method();
      ScopedFactoryAspect a1 = ScopedFactoryAspect.last;
      assertNotNull(a1);
     
      ScopedFactoryAspect.last = null;     
      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);
      ScopedFactoryAspect a4 = ScopedFactoryAspect.last;
      assertNotNull(a4);
     
      ScopedFactoryAspect.last = null;     
      pojo2.method();
      ScopedFactoryAspect a5 = ScopedFactoryAspect.last;
      assertNotNull(a5);
     
      ScopedFactoryAspect.last = null;     
      pojo2.method(1);
      ScopedFactoryAspect a6 = ScopedFactoryAspect.last;
      assertNotNull(a6);
     
     
      assertNotSame(a1, a2);
View Full Code Here

TOP

Related Classes of org.jboss.test.microcontainer.beans.POJO2

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.