Search in sources :

Example 1 with AnnotationKeyRegistryService

use of com.navercorp.pinpoint.common.service.AnnotationKeyRegistryService in project pinpoint by naver.

the class AnnotationKeyTest method testValueOf.

@Test
public void testValueOf() {
    AnnotationKeyRegistryService annotationKeyRegistryService = new DefaultAnnotationKeyRegistryService();
    annotationKeyRegistryService.findAnnotationKeyByName(AnnotationKey.ARGS0.getName());
    AnnotationKey valueof = annotationKeyRegistryService.findAnnotationKeyByName(AnnotationKey.ARGS0.getName());
    Assert.assertSame(AnnotationKey.ARGS0, valueof);
}
Also used : DefaultAnnotationKeyRegistryService(com.navercorp.pinpoint.common.service.DefaultAnnotationKeyRegistryService) AnnotationKeyRegistryService(com.navercorp.pinpoint.common.service.AnnotationKeyRegistryService) AnnotationKey(com.navercorp.pinpoint.common.trace.AnnotationKey) DefaultAnnotationKeyRegistryService(com.navercorp.pinpoint.common.service.DefaultAnnotationKeyRegistryService) Test(org.junit.Test)

Example 2 with AnnotationKeyRegistryService

use of com.navercorp.pinpoint.common.service.AnnotationKeyRegistryService in project pinpoint by naver.

the class AnnotationKeyTest method getCode.

@Test
public void getCode() {
    TraceMetadataLoaderService typeLoaderService = new DefaultTraceMetadataLoaderService();
    AnnotationKeyRegistryService annotationKeyRegistryService = new DefaultAnnotationKeyRegistryService(typeLoaderService, StdoutCommonLoggerFactory.INSTANCE);
    AnnotationKey annotationKey = annotationKeyRegistryService.findAnnotationKey(AnnotationKey.API.getCode());
    Assert.assertEquals(annotationKey, AnnotationKey.API);
}
Also used : DefaultTraceMetadataLoaderService(com.navercorp.pinpoint.common.service.DefaultTraceMetadataLoaderService) TraceMetadataLoaderService(com.navercorp.pinpoint.common.service.TraceMetadataLoaderService) DefaultTraceMetadataLoaderService(com.navercorp.pinpoint.common.service.DefaultTraceMetadataLoaderService) DefaultAnnotationKeyRegistryService(com.navercorp.pinpoint.common.service.DefaultAnnotationKeyRegistryService) AnnotationKeyRegistryService(com.navercorp.pinpoint.common.service.AnnotationKeyRegistryService) AnnotationKey(com.navercorp.pinpoint.common.trace.AnnotationKey) DefaultAnnotationKeyRegistryService(com.navercorp.pinpoint.common.service.DefaultAnnotationKeyRegistryService) Test(org.junit.Test)

Aggregations

AnnotationKeyRegistryService (com.navercorp.pinpoint.common.service.AnnotationKeyRegistryService)2 DefaultAnnotationKeyRegistryService (com.navercorp.pinpoint.common.service.DefaultAnnotationKeyRegistryService)2 AnnotationKey (com.navercorp.pinpoint.common.trace.AnnotationKey)2 Test (org.junit.Test)2 DefaultTraceMetadataLoaderService (com.navercorp.pinpoint.common.service.DefaultTraceMetadataLoaderService)1 TraceMetadataLoaderService (com.navercorp.pinpoint.common.service.TraceMetadataLoaderService)1