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());
}
Aggregations