Package org.jboss.test.aop.jdk15

Examples of org.jboss.test.aop.jdk15.SimpleInterceptor


      POJOWrappingInfo[] wrappingInfos = scenarioLoader.interceptPerClassLoadAfter();
      // check wrapping status
      assertFullyWrapped(wrappingInfos[0]);
      assertUnwrapped(wrappingInfos[1]);
      // check interception counts
      InterceptionsCount instance = InstanceInterceptor.getInterceptionsCount();
      assertEquals(0, instance.total);
      InterceptionsCount binding = BindingInterceptor.getInterceptionsCount();
      assertTrue(binding.total >= 5 && binding.total <= 8);
      assertTrue(binding.constructor >= 1 && binding.constructor <= 2);
      assertTrue(binding.fieldRead >= 1 && binding.fieldRead <= 2);
      assertTrue(binding.fieldWrite >= 1 && binding.fieldWrite <= 2);
      assertEquals(2, binding.method);
View Full Code Here


      // check wrapping status
      assertUnwrapped(wrappingInfos[0]);
      assertOnlyConstructorWrapped(wrappingInfos[1]);
      assertUnwrapped(wrappingInfos[2]);
      // check interception counts
      InterceptionsCount instance = InstanceInterceptor.getInterceptionsCount();
      assertEquals(0, instance.total);
      InterceptionsCount binding = BindingInterceptor.getInterceptionsCount();
      assertTrue(binding.total >= 1 && binding.total <= 2);
      assertTrue(binding.constructor >= 1 && binding.constructor <=2);
      assertEquals(0, binding.fieldRead);
      assertEquals(0, binding.fieldWrite);
      assertEquals(0, binding.method);
View Full Code Here

      assertOnlyConstructorWrapped(wrappingInfos[1]);
      assertUnwrapped(wrappingInfos[2]);
      assertOnlyConstructorWrapped(wrappingInfos[3]);
      assertUnwrapped(wrappingInfos[4]);
      // check interception counts
      InterceptionsCount instance = InstanceInterceptor.getInterceptionsCount();
      assertEquals(0, instance.total);
      InterceptionsCount binding = BindingInterceptor.getInterceptionsCount();
      assertEquals(2, binding.total);
      assertEquals(2, binding.constructor);
      assertEquals(0, binding.fieldRead);
      assertEquals(0, binding.fieldWrite);
      assertEquals(0, binding.method);
View Full Code Here

      POJOWrappingInfo[] wrappingInfos = scenarioLoader.interceptPerInstance();
      // check wrapping status
      assertUnwrapped(wrappingInfos[0]);
      assertOnlyConstructorWrapped(wrappingInfos[1]);
      // check interception counts     
      InterceptionsCount binding = BindingInterceptor.getInterceptionsCount();
      assertEquals(0, binding.total);
      InterceptionsCount instance = InstanceInterceptor.getInterceptionsCount();
      assertEquals(0, instance.total);
   }
View Full Code Here

      // check wrapping status
      assertUnwrapped(wrappingInfos[0]);
      assertOnlyConstructorWrapped(wrappingInfos[1]);
      assertUnwrapped(wrappingInfos[2]);
      // check interception counts
      InterceptionsCount binding = BindingInterceptor.getInterceptionsCount();
      assertEquals(0, binding.total);
      // result of the time the JVMTI takes to hot swap classes
      InterceptionsCount instance = InstanceInterceptor.getInterceptionsCount();
      assertEquals(0, instance.total);
   }
View Full Code Here

      // check wrapping status
      assertUnwrapped(wrappingInfos[0]);
      assertOnlyConstructorWrapped(wrappingInfos[1]);
      assertOnlyConstructorWrapped(wrappingInfos[2]);
      // check interception counts
      InterceptionsCount binding = BindingInterceptor.getInterceptionsCount();
      assertEquals(1, binding.total);
      assertEquals(1, binding.constructor);
      assertEquals(0, binding.fieldRead);
      assertEquals(0, binding.fieldWrite);
      assertEquals(0, binding.method);
      InterceptionsCount instance = InstanceInterceptor.getInterceptionsCount();
      assertEquals(0, instance.total);
   }
View Full Code Here

      // check wrapping status
      assertOnlyConstructorWrapped(wrappingInfos[0]);
      assertOnlyConstructorWrapped(wrappingInfos[1]);
      assertOnlyConstructorWrapped(wrappingInfos[2]);
      // check interception counts
      InterceptionsCount binding = BindingInterceptor.getInterceptionsCount();
      assertEquals(1, binding.total);
      assertEquals(1, binding.constructor);
      assertEquals(0, binding.fieldRead);
      assertEquals(0, binding.fieldWrite);
      assertEquals(0, binding.method);
      InterceptionsCount instance = InstanceInterceptor.getInterceptionsCount();
      assertEquals(0, instance.total);
      assertEquals(0, instance.constructor);
   }
View Full Code Here

    */
   public void testAfterBindingRemovalExecution() throws Throwable
   {
      POJOWrappingInfo[] wrappingInfos = scenarioLoader.executeAfterBindingRemoval();
      assertUnwrapped(wrappingInfos[0]);
      InterceptionsCount binding = BindingInterceptor.getInterceptionsCount();
      assertEquals(0, binding.total);
      InterceptionsCount instance = InstanceInterceptor.getInterceptionsCount();
      assertEquals(0, instance.total);
   }
View Full Code Here

            assertTrue(wrappingInfos[i].isFieldReadWrapped());
            assertTrue(wrappingInfos[i].isFieldWriteWrapped());
            assertTrue(wrappingInfos[i].isMethodWrapped());
         }
         // check interception counts
         InterceptionsCount instance = InstanceInterceptor.getInterceptionsCount();
         assertEquals(0, instance.total);
         InterceptionsCount binding = BindingInterceptor.getInterceptionsCount();
         assertEquals(4, binding.total);
         assertEquals(2, binding.constructor);
         assertEquals(0, binding.fieldRead);
         assertEquals(0, binding.fieldWrite);
         assertEquals(2, binding.method);
         return;
      }
      // check wrapping status
      assertOnlyConstructorWrapped(wrappingInfos);
      // check interception counts
      InterceptionsCount instance = InstanceInterceptor.getInterceptionsCount();
      assertEquals(0, instance.total);
      InterceptionsCount binding = BindingInterceptor.getInterceptionsCount();
      assertEquals(2, binding.total);
      assertEquals(2, binding.constructor);
      assertEquals(0, binding.fieldRead);
      assertEquals(0, binding.fieldWrite);
      assertEquals(0, binding.method);
View Full Code Here

      // run scenario
      POJOWrappingInfo[] wrappingInfos = scenarioLoader.interceptPerClassLoadBefore();
      // check wrapping status
      assertOnlyConstructorWrapped(wrappingInfos);
      // check interception counts
      InterceptionsCount instance = InstanceInterceptor.getInterceptionsCount();
      assertEquals(0, instance.total);
      InterceptionsCount binding = BindingInterceptor.getInterceptionsCount();
      assertEquals(1, binding.total);
      assertEquals(1, binding.constructor);
      assertEquals(0, binding.fieldRead);
      assertEquals(0, binding.fieldWrite);
      assertEquals(0, binding.method);
View Full Code Here

TOP

Related Classes of org.jboss.test.aop.jdk15.SimpleInterceptor

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.