Package org.jboss.test.microcontainer.beans

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


      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);
      assertNotSame(a1, a4);
      assertNotSame(a1, a5);
      assertNotSame(a1, a6);
      assertNotSame(a2, a3);
      assertNotSame(a2, a4);
      assertNotSame(a2, a5);
      assertNotSame(a2, a6);
      assertNotSame(a3, a4);
      assertNotSame(a3, a5);
      assertNotSame(a3, a6);
      assertNotSame(a4, a5);
      assertNotSame(a4, a6);
      assertNotSame(a5, a6);
     
      ScopedFactoryAspect.last = null;
      pojoA.method();
      ScopedFactoryAspect a7 = ScopedFactoryAspect.last;
      assertNotNull(a7);
      assertSame(a1, a7);
   }
View Full Code Here


      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;
      pojo.method(3);
      ScopedFactoryAspect a3 = ScopedFactoryAspect.last;
      assertNotNull(a3);
      assertSame(a1, a3);
   }
View Full Code Here

      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

      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;
      pojo.method(3);
      ScopedFactoryAspect a3 = ScopedFactoryAspect.last;
      assertNotNull(a3);
      assertSame(a1, a3);
   }
View Full Code Here

      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);
      assertSame(a1, a3);
      assertNotSame(a1, a4);
      assertNotSame(a1, a5);
      assertNotSame(a1, a6);
      assertNotSame(a2, a3);
      assertSame(a2, a4);
      assertNotSame(a2, a5);
      assertNotSame(a2, a6);
      assertNotSame(a3, a4);
      assertNotSame(a3, a5);
      assertNotSame(a3, a6);
      assertNotSame(a4, a5);
      assertNotSame(a4, a6);
      assertNotSame(a5, a6);
     
      ScopedFactoryAspect.last = null;
      pojoA.method();
      ScopedFactoryAspect a7 = ScopedFactoryAspect.last;
      assertNotNull(a7);
      assertSame(a1, a7);
   }
View Full Code Here

TOP

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

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.