Search in sources :

Example 1 with IScanService

use of org.eclipse.scanning.api.scan.IScanService in project gda-core by openGDA.

the class FileRegistrarUnitTest method testRegister.

@Test
public void testRegister() throws Exception {
    final IScanService scanService = mock(IScanService.class);
    new ServiceHolder().setRunnableDeviceService(scanService);
    final ArgumentCaptor<FileRegistrar> fileRegistrarCaptor = ArgumentCaptor.forClass(FileRegistrar.class);
    final FileRegistrar fileRegistrar = new FileRegistrar(icatXmlCreator);
    fileRegistrar.register();
    verify(scanService).addScanParticipant(fileRegistrarCaptor.capture());
    assertEquals(fileRegistrar, fileRegistrarCaptor.getValue());
}
Also used : ServiceHolder(gda.data.ServiceHolder) IScanService(org.eclipse.scanning.api.scan.IScanService) Test(org.junit.Test)

Aggregations

ServiceHolder (gda.data.ServiceHolder)1 IScanService (org.eclipse.scanning.api.scan.IScanService)1 Test (org.junit.Test)1