use of com.navercorp.pinpoint.bootstrap.DefaultAgentOption in project pinpoint by naver.
the class DependencyGraph method newApplicationContext.
private DefaultApplicationContext newApplicationContext() {
ProfilerConfig profilerConfig = spy(new DefaultProfilerConfig());
Mockito.when(profilerConfig.getStaticResourceCleanup()).thenReturn(true);
Instrumentation instrumentation = mock(Instrumentation.class);
AgentOption agentOption = new DefaultAgentOption(instrumentation, "mockAgentId", "mockAgentName", "mockApplicationName", false, profilerConfig, Collections.<String>emptyList(), Collections.<String>emptyList());
InterceptorRegistryBinder interceptorRegistryBinder = new TestInterceptorRegistryBinder();
Module testInterceptorRegistryModule = InterceptorRegistryModule.wrap(interceptorRegistryBinder);
ModuleFactory moduleFactory = new OverrideModuleFactory(testInterceptorRegistryModule);
return new DefaultApplicationContext(agentOption, moduleFactory);
}
use of com.navercorp.pinpoint.bootstrap.DefaultAgentOption in project pinpoint by naver.
the class MockApplicationContextFactory method build.
public DefaultApplicationContext build(ProfilerConfig config, ModuleFactory moduleFactory) {
Instrumentation instrumentation = Mockito.mock(Instrumentation.class);
String mockAgentId = "mockAgentId";
String mockAgentName = "mockAgentName";
String mockApplicationName = "mockApplicationName";
AgentOption agentOption = new DefaultAgentOption(instrumentation, mockAgentId, mockAgentName, mockApplicationName, false, config, Collections.<String>emptyList(), Collections.<String>emptyList());
return new DefaultApplicationContext(agentOption, moduleFactory);
}
Aggregations