use of org.alfresco.service.descriptor.Descriptor in project alfresco-repository by Alfresco.
the class SystemUsageDataCollectorTest method setUp.
@Before
public void setUp() {
mockDescriptorDAO = mock(DescriptorDAO.class);
mockCollectorService = mock(HBDataCollectorService.class);
mockScheduler = mock(HeartBeatJobScheduler.class);
mockDataSource = mock(BasicDataSource.class);
Descriptor mockDescriptor = mock(Descriptor.class);
when(mockDescriptor.getId()).thenReturn("mock_id");
when(mockDescriptorDAO.getDescriptor()).thenReturn(mockDescriptor);
usageSystemCollector = new SystemUsageDataCollector("acs.repository.usage.system", "1.0", "0 0 0 ? * *", mockScheduler);
usageSystemCollector.setHbDataCollectorService(mockCollectorService);
usageSystemCollector.setDataSource(mockDataSource);
usageSystemCollector.setCurrentRepoDescriptorDAO(mockDescriptorDAO);
collectedData = usageSystemCollector.collectData();
}
Aggregations