use of com.newrelic.agent.TransactionService in project newrelic-java-agent by newrelic.
the class SyntheticsTransactionSamplerTest method createServiceManager.
private static void createServiceManager(Map<String, Object> configMap) throws Exception {
MockServiceManager serviceManager = new MockServiceManager();
ServiceFactory.setServiceManager(serviceManager);
ConfigService configService = ConfigServiceFactory.createConfigService(AgentConfigImpl.createAgentConfig(configMap), configMap);
serviceManager.setConfigService(configService);
DatabaseService dbService = new DatabaseService();
serviceManager.setDatabaseService(dbService);
HarvestService harvestService = new MockHarvestService();
serviceManager.setHarvestService(harvestService);
TransactionService transactionService = new TransactionService();
serviceManager.setTransactionService(transactionService);
MockRPMServiceManager rpmServiceManager = new MockRPMServiceManager();
serviceManager.setRPMServiceManager(rpmServiceManager);
MockRPMService rpmService = new MockRPMService();
rpmService.setApplicationName(APP_NAME);
rpmService.setIsConnected(true);
rpmServiceManager.setRPMService(rpmService);
CommandParser commandParser = new CommandParser();
serviceManager.setCommandParser(commandParser);
AttributesService attService = new AttributesService();
serviceManager.setAttributesService(attService);
TransactionTraceService ttService = new TransactionTraceService();
serviceManager.setTransactionTraceService(ttService);
ttService.start();
}
Aggregations