use of org.alfresco.repo.descriptor.DescriptorDAO in project alfresco-repository by Alfresco.
the class AuthoritiesDataCollectorTest method setUp.
@Before
public void setUp() {
HBDataCollectorService mockCollectorService = mock(HBDataCollectorService.class);
AuthorityService authorityService = mock(AuthorityService.class);
mockScheduler = mock(HeartBeatJobScheduler.class);
Descriptor mockDescriptor = mock(Descriptor.class);
when(mockDescriptor.getId()).thenReturn("mock_id");
DescriptorDAO descriptorDAO = mock(DescriptorDAO.class);
when(descriptorDAO.getDescriptor()).thenReturn(mockDescriptor);
authorityDataCollector = new AuthoritiesDataCollector("acs.repository.usage.authorities", "1.0", "0 0 0 ? * *", mockScheduler);
authorityDataCollector.setAuthorityService(authorityService);
authorityDataCollector.setCurrentRepoDescriptorDAO(descriptorDAO);
authorityDataCollector.setHbDataCollectorService(mockCollectorService);
collectedData = authorityDataCollector.collectData();
}
Aggregations