Search in sources :

Example 1 with RenditionsDataCollector

use of org.alfresco.heartbeat.RenditionsDataCollector in project alfresco-remote-api by Alfresco.

the class RenditionsDataCollectorTest method setUp.

@Before
public void setUp() {
    mockDescriptorDAO = mock(DescriptorDAO.class);
    mockCollectorService = mock(HBDataCollectorService.class);
    mockScheduler = mock(HeartBeatJobScheduler.class);
    Descriptor mockDescriptor = mock(Descriptor.class);
    when(mockDescriptor.getId()).thenReturn("mock_id");
    when(mockDescriptorDAO.getDescriptor()).thenReturn(mockDescriptor);
    renditionsDataCollector = new RenditionsDataCollector("acs.repository.renditions", "1.0", "0 0 0 ? * *", mockScheduler);
    renditionsDataCollector.setHbDataCollectorService(mockCollectorService);
    renditionsDataCollector.setCurrentRepoDescriptorDAO(mockDescriptorDAO);
}
Also used : RenditionsDataCollector(org.alfresco.heartbeat.RenditionsDataCollector) HeartBeatJobScheduler(org.alfresco.heartbeat.jobs.HeartBeatJobScheduler) HBDataCollectorService(org.alfresco.service.cmr.repository.HBDataCollectorService) Descriptor(org.alfresco.service.descriptor.Descriptor) DescriptorDAO(org.alfresco.repo.descriptor.DescriptorDAO) Before(org.junit.Before)

Aggregations

RenditionsDataCollector (org.alfresco.heartbeat.RenditionsDataCollector)1 HeartBeatJobScheduler (org.alfresco.heartbeat.jobs.HeartBeatJobScheduler)1 DescriptorDAO (org.alfresco.repo.descriptor.DescriptorDAO)1 HBDataCollectorService (org.alfresco.service.cmr.repository.HBDataCollectorService)1 Descriptor (org.alfresco.service.descriptor.Descriptor)1 Before (org.junit.Before)1