Search in sources :

Example 6 with TestInterceptor1

use of com.navercorp.pinpoint.profiler.plugin.TestInterceptors.TestInterceptor1 in project pinpoint by naver.

the class AnnotatedInterceptorFactoryTest method test3.

@Test
public void test3() throws Exception {
    Object[] args = new Object[] { "arg0", (byte) 1, (short) 2, (float) 3.0 };
    AnnotatedInterceptorFactory factory = newAnnotatedInterceptorFactory();
    Interceptor interceptor = factory.getInterceptor(getClass().getClassLoader(), TestInterceptor1.class.getName(), args, null, null, instrumentClass, instrumentMethod);
    assertEquals(TestInterceptor1.class, interceptor.getClass());
    assertEquals(args[0], getField(interceptor, "field0"));
    assertEquals(args[1], getField(interceptor, "field1"));
    assertEquals(args[2], getField(interceptor, "field2"));
    assertEquals(args[3], getField(interceptor, "field3"));
}
Also used : TestInterceptor1(com.navercorp.pinpoint.profiler.plugin.TestInterceptors.TestInterceptor1) Interceptor(com.navercorp.pinpoint.bootstrap.interceptor.Interceptor) AnnotatedInterceptorFactory(com.navercorp.pinpoint.profiler.interceptor.factory.AnnotatedInterceptorFactory) Test(org.junit.Test)

Aggregations

AnnotatedInterceptorFactory (com.navercorp.pinpoint.profiler.interceptor.factory.AnnotatedInterceptorFactory)6 TestInterceptor1 (com.navercorp.pinpoint.profiler.plugin.TestInterceptors.TestInterceptor1)6 Test (org.junit.Test)6 Interceptor (com.navercorp.pinpoint.bootstrap.interceptor.Interceptor)4