use of com.navercorp.pinpoint.profiler.plugin.TestInterceptors.TestInterceptor1 in project pinpoint by naver.
the class AnnotatedInterceptorFactoryTest method test4.
@Test
public void test4() throws Exception {
Object[] args = new Object[] { (byte) 1, (short) 2, (float) 3.0, "arg0" };
AnnotatedInterceptorFactory factory = newAnnotatedInterceptorFactory();
Interceptor interceptor = factory.getInterceptor(getClass().getClassLoader(), TestInterceptor1.class.getName(), args, null, null, instrumentClass, instrumentMethod);
assertEquals(TestInterceptor1.class, interceptor.getClass());
assertEquals(args[3], getField(interceptor, "field0"));
assertEquals(args[0], getField(interceptor, "field1"));
assertEquals(args[1], getField(interceptor, "field2"));
assertEquals(args[2], getField(interceptor, "field3"));
}
use of com.navercorp.pinpoint.profiler.plugin.TestInterceptors.TestInterceptor1 in project pinpoint by naver.
the class AnnotatedInterceptorFactoryTest method test8.
@Test(expected = PinpointException.class)
public void test8() throws Exception {
AnnotatedInterceptorFactory factory = newAnnotatedInterceptorFactory();
factory.getInterceptor(getClass().getClassLoader(), TestInterceptor1.class.getName(), null, null, null, instrumentClass, instrumentMethod);
}
use of com.navercorp.pinpoint.profiler.plugin.TestInterceptors.TestInterceptor1 in project pinpoint by naver.
the class AnnotatedInterceptorFactoryTest method test7.
@Test(expected = PinpointException.class)
public void test7() throws Exception {
AnnotatedInterceptorFactory factory = newAnnotatedInterceptorFactory();
factory.getInterceptor(getClass().getClassLoader(), TestInterceptor1.class.getName(), null, null, null, instrumentClass, instrumentMethod);
}
use of com.navercorp.pinpoint.profiler.plugin.TestInterceptors.TestInterceptor1 in project pinpoint by naver.
the class AnnotatedInterceptorFactoryTest method test6.
@Test
public void test6() throws Exception {
Object[] args = new Object[] { (float) 3.0, (short) 2, (byte) 1, "arg0" };
AnnotatedInterceptorFactory factory = newAnnotatedInterceptorFactory();
Interceptor interceptor = factory.getInterceptor(getClass().getClassLoader(), TestInterceptor1.class.getName(), args, null, null, instrumentClass, instrumentMethod);
assertEquals(TestInterceptor1.class, interceptor.getClass());
assertEquals(args[3], getField(interceptor, "field0"));
assertEquals(args[2], getField(interceptor, "field1"));
assertEquals(args[1], getField(interceptor, "field2"));
assertEquals(args[0], getField(interceptor, "field3"));
}
use of com.navercorp.pinpoint.profiler.plugin.TestInterceptors.TestInterceptor1 in project pinpoint by naver.
the class AnnotatedInterceptorFactoryTest method test5.
@Test
public void test5() throws Exception {
Object[] args = new Object[] { (short) 2, (float) 3.0, "arg0", (byte) 1 };
AnnotatedInterceptorFactory factory = newAnnotatedInterceptorFactory();
Interceptor interceptor = factory.getInterceptor(getClass().getClassLoader(), TestInterceptor1.class.getName(), args, null, null, instrumentClass, instrumentMethod);
assertEquals(TestInterceptor1.class, interceptor.getClass());
assertEquals(args[2], getField(interceptor, "field0"));
assertEquals(args[3], getField(interceptor, "field1"));
assertEquals(args[0], getField(interceptor, "field2"));
assertEquals(args[1], getField(interceptor, "field3"));
}
Aggregations