Package org.jboss.test.microcontainer.matrix

Examples of org.jboss.test.microcontainer.matrix.Base


*/
public class AdvisedInstanceMetaDataContextTestCase extends AOPMicrocontainerTest
{
   public void testNoMetaDataContext() throws Exception
   {
      Base base = (Base)getBean("NotAdvised");
      assertTrue(base instanceof Advised);
      assertFalse(base instanceof AspectManaged);
     
      //Not the main purpose of the test but being paranoid never hurt
      TestInterceptor.reset();
      base.baseOnly();
      assertEquals(1, TestInterceptor.interceptions);
      assertNotNull(TestInterceptor.invoked);
      assertEquals("baseOnly", TestInterceptor.invoked.getName());
      assertNull(TestInterceptor.classAnnotation);
      assertNull(TestInterceptor.methodAnnotation);
View Full Code Here


   }
  
   public void testClassMetaDataContext() throws Exception
   {
      Base.baseInvoked = false;
      Base base = (Base)getBean("ClassAnnotated");
      assertTrue(base instanceof Advised);
      assertTrue(base instanceof AspectManaged);

      //Not the main purpose of the test but being paranoid never hurt
      TestInterceptor.reset();
      base.baseOnly();
      assertTrue(Base.baseInvoked);
      assertEquals(1, TestInterceptor.interceptions);
      assertNotNull(TestInterceptor.invoked);
      assertEquals("baseOnly", TestInterceptor.invoked.getName());
      assertNotNull(TestInterceptor.classAnnotation);
View Full Code Here

   }
  
   public void testPropertyMetaDataContext() throws Exception
   {
      Base.baseInvoked = false;
      Base base = (Base)getBean("PropertyAnnotated");
      assertTrue(base instanceof Advised);
      assertTrue(base instanceof AspectManaged);
     
      //Not the main purpose of the test but being paranoid never hurt
      TestInterceptor.reset();
      base.setProperty(5);
      assertTrue(Base.baseInvoked);
      assertEquals(1, TestInterceptor.interceptions);
      assertNotNull(TestInterceptor.invoked);
      assertEquals("setProperty", TestInterceptor.invoked.getName());
      assertNull(TestInterceptor.classAnnotation);
View Full Code Here

*/
public class NotAdvisedInstanceMetaDataContextTestCase extends AOPMicrocontainerTest
{
   public void testNoMetaDataContext() throws Exception
   {
      Base base = (Base)getBean("NotAdvised");
      assertFalse(base instanceof Advised);
      assertFalse(base instanceof AspectManaged);
     
      //Not the main purpose of the test but being paranoid never hurt
      TestInterceptor.reset();
      base.baseOnly();
      assertEquals(0, TestInterceptor.interceptions);
     
      String name = DynamicAspectDeployer.addBinding("execution(* org.jboss.test.microcontainer.matrix.Base->*(..))", TestInterceptor.class);
      TestInterceptor.reset();
      base.baseOnly();
      assertEquals(0, TestInterceptor.interceptions);
     
      DynamicAspectDeployer.removeBinding(name);
      TestInterceptor.reset();
      base.baseOnly();
      assertEquals(0, TestInterceptor.interceptions);     
   }
View Full Code Here

      assertEquals(0, TestInterceptor.interceptions);     
   }
  
   public void testClassMetaDataContext() throws Exception
   {
      Base base = (Base)getBean("ClassAnnotated");
      assertFalse(base instanceof Advised);
      assertFalse(base instanceof AspectManaged);
   }
View Full Code Here

      assertFalse(base instanceof AspectManaged);
   }
  
   public void testMethodMetaDataContext() throws Exception
   {
      Base base = (Base)getBean("PropertyAnnotated");
      assertFalse(base instanceof Advised);
      assertFalse(base instanceof AspectManaged);
   }
View Full Code Here

*/
public class BaseAdvisedChildProxyTestCase extends AOPMicrocontainerTest
{
   public void testAdvisedBaseClass() throws Exception
   {
      Base base = (Base)getBean("Base");
      assertTrue(base instanceof Advised);
      assertFalse(base instanceof AspectManaged);
     
      TestInterceptor.reset();
      base.baseOnly();
      assertEquals(1, TestInterceptor.interceptions);
      assertNotNull(TestInterceptor.invoked);
      assertEquals("baseOnly", TestInterceptor.invoked.getName());
      assertNull(TestInterceptor.classAnnotation);
      assertNull(TestInterceptor.methodAnnotation);
      assertNull(TestInterceptor.metadata);

      TestInterceptor.reset();
      base.baseOverridden();
      assertEquals(1, TestInterceptor.interceptions);
      assertNotNull(TestInterceptor.invoked);
      assertEquals("baseOverridden", TestInterceptor.invoked.getName());
      assertNull(TestInterceptor.classAnnotation);
      assertNull(TestInterceptor.methodAnnotation);
View Full Code Here

*/
public class BaseAdvisedChildAdvisedAndProxyTestCase extends AOPMicrocontainerTest
{
   public void testAdvisedBaseClass() throws Exception
   {
      Base base = (Base)getBean("Base");
      assertTrue(base instanceof Advised);
      assertFalse(base instanceof AspectManaged);
     
      TestInterceptor.reset();
      base.baseOnly();
      assertEquals(1, TestInterceptor.interceptions);
      assertNotNull(TestInterceptor.invoked);
      assertEquals("baseOnly", TestInterceptor.invoked.getName());
      assertNull(TestInterceptor.classAnnotation);
      assertNull(TestInterceptor.methodAnnotation);
      assertNull(TestInterceptor.metadata);

      TestInterceptor.reset();
      base.baseOverridden();
      assertEquals(1, TestInterceptor.interceptions);
      assertNotNull(TestInterceptor.invoked);
      assertEquals("baseOverridden", TestInterceptor.invoked.getName());
      assertNull(TestInterceptor.classAnnotation);
      assertNull(TestInterceptor.methodAnnotation);
View Full Code Here

*/
public class BaseOverriddenAdvisedChildAdvisedAndProxyTestCase extends AOPMicrocontainerTest
{
   public void testAdvisedBaseClass() throws Exception
   {
      Base base = (Base)getBean("Base");
      assertTrue(base instanceof Advised);
      assertFalse(base instanceof AspectManaged);
     
      TestInterceptor.reset();
      base.baseOnly();
      assertEquals(0, TestInterceptor.interceptions);

      TestInterceptor.reset();
      base.baseOverridden();
      assertEquals(1, TestInterceptor.interceptions);
      assertNotNull(TestInterceptor.invoked);
      assertEquals("baseOverridden", TestInterceptor.invoked.getName());
      assertNull(TestInterceptor.classAnnotation);
      assertNull(TestInterceptor.methodAnnotation);
View Full Code Here

*/
public class NotAdvisedNoInstanceDataTestCase extends AOPMicrocontainerTest
{
   public void testNotAdvised() throws Exception
   {
      Base base = (Base)getBean("Test");
      assertFalse(base instanceof Advised);
      assertFalse(base instanceof AspectManaged);
     
      //Not the main purpose of the test but being paranoid never hurt
      TestInterceptor.reset();
      base.baseOnly();
      assertEquals(0, TestInterceptor.interceptions);
     
      String name = DynamicAspectDeployer.addBinding("execution(* org.jboss.test.microcontainer.matrix.Base->*(..))", TestInterceptor.class);
      TestInterceptor.reset();
      base.baseOnly();
      assertEquals(0, TestInterceptor.interceptions);
     
      DynamicAspectDeployer.removeBinding(name);
      TestInterceptor.reset();
      base.baseOnly();
      assertEquals(0, TestInterceptor.interceptions);     
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.microcontainer.matrix.Base

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.