Search in sources :

Example 1 with RunnableDeviceServiceImpl

use of org.eclipse.scanning.sequencer.RunnableDeviceServiceImpl in project gda-core by openGDA.

the class ScannableNexusWrapperScanTest method setServices.

@BeforeClass
public static void setServices() throws Exception {
    jythonServer = mock(JythonServer.class);
    scannableDeviceService = new ScannableDeviceConnectorService();
    // Not testing OSGi so using hard coded service.
    scanService = new RunnableDeviceServiceImpl(scannableDeviceService);
    pointGenService = new PointGeneratorService();
    nexusFileFactory = new NexusFileFactoryHDF5();
    final ActivemqConnectorService activemqConnectorService = new ActivemqConnectorService();
    activemqConnectorService.setJsonMarshaller(new MarshallerService(new PointsModelMarshaller()));
    final IEventService eservice = new EventServiceImpl(activemqConnectorService);
    final Services services = new Services();
    services.setEventService(eservice);
    services.setRunnableDeviceService(scanService);
    services.setGeneratorService(pointGenService);
    services.setConnector(scannableDeviceService);
    final INexusDeviceService nexusDeviceService = new NexusDeviceService();
    new org.eclipse.dawnsci.nexus.ServiceHolder().setNexusFileFactory(nexusFileFactory);
    final org.eclipse.scanning.sequencer.ServiceHolder serviceHolder = new org.eclipse.scanning.sequencer.ServiceHolder();
    serviceHolder.setNexusDeviceService(nexusDeviceService);
    serviceHolder.setNexusScanFileService(new NexusScanFileServiceImpl());
    serviceHolder.setOperationService(new MockOperationService());
    serviceHolder.setFilePathService(new MockFilePathService());
    final org.eclipse.dawnsci.nexus.scan.ServiceHolder scanServiceHolder = new org.eclipse.dawnsci.nexus.scan.ServiceHolder();
    scanServiceHolder.setNexusDeviceService(nexusDeviceService);
    scanServiceHolder.setNexusBuilderFactory(new DefaultNexusBuilderFactory());
    final org.eclipse.scanning.points.ServiceHolder pointsServiceHolder = new org.eclipse.scanning.points.ServiceHolder();
    pointsServiceHolder.setValidatorService(new ValidatorService());
    pointsServiceHolder.setPointGeneratorService(new PointGeneratorService());
}
Also used : RunnableDeviceServiceImpl(org.eclipse.scanning.sequencer.RunnableDeviceServiceImpl) ServiceHolder(gda.data.ServiceHolder) IPointGeneratorService(org.eclipse.scanning.api.points.IPointGeneratorService) PointGeneratorService(org.eclipse.scanning.points.PointGeneratorService) NexusFileFactoryHDF5(org.eclipse.dawnsci.hdf5.nexus.NexusFileFactoryHDF5) MockOperationService(org.eclipse.scanning.test.utilities.scan.mock.MockOperationService) ValidatorService(org.eclipse.scanning.points.validation.ValidatorService) JythonServer(gda.jython.JythonServer) NexusDeviceService(org.eclipse.dawnsci.nexus.device.impl.NexusDeviceService) INexusDeviceService(org.eclipse.dawnsci.nexus.device.INexusDeviceService) INexusDeviceService(org.eclipse.dawnsci.nexus.device.INexusDeviceService) EventServiceImpl(org.eclipse.scanning.event.EventServiceImpl) IEventService(org.eclipse.scanning.api.event.IEventService) ActivemqConnectorService(org.eclipse.scanning.connector.activemq.ActivemqConnectorService) MockFilePathService(org.eclipse.scanning.example.file.MockFilePathService) MarshallerService(org.eclipse.dawnsci.json.MarshallerService) PointsModelMarshaller(org.eclipse.scanning.points.serialization.PointsModelMarshaller) NexusScanFileServiceImpl(org.eclipse.dawnsci.nexus.scan.impl.NexusScanFileServiceImpl) DefaultNexusBuilderFactory(org.eclipse.dawnsci.nexus.builder.impl.DefaultNexusBuilderFactory) Services(org.eclipse.scanning.server.servlet.Services) BeforeClass(org.junit.BeforeClass)

Aggregations

ServiceHolder (gda.data.ServiceHolder)1 JythonServer (gda.jython.JythonServer)1 NexusFileFactoryHDF5 (org.eclipse.dawnsci.hdf5.nexus.NexusFileFactoryHDF5)1 MarshallerService (org.eclipse.dawnsci.json.MarshallerService)1 DefaultNexusBuilderFactory (org.eclipse.dawnsci.nexus.builder.impl.DefaultNexusBuilderFactory)1 INexusDeviceService (org.eclipse.dawnsci.nexus.device.INexusDeviceService)1 NexusDeviceService (org.eclipse.dawnsci.nexus.device.impl.NexusDeviceService)1 NexusScanFileServiceImpl (org.eclipse.dawnsci.nexus.scan.impl.NexusScanFileServiceImpl)1 IEventService (org.eclipse.scanning.api.event.IEventService)1 IPointGeneratorService (org.eclipse.scanning.api.points.IPointGeneratorService)1 ActivemqConnectorService (org.eclipse.scanning.connector.activemq.ActivemqConnectorService)1 EventServiceImpl (org.eclipse.scanning.event.EventServiceImpl)1 MockFilePathService (org.eclipse.scanning.example.file.MockFilePathService)1 PointGeneratorService (org.eclipse.scanning.points.PointGeneratorService)1 PointsModelMarshaller (org.eclipse.scanning.points.serialization.PointsModelMarshaller)1 ValidatorService (org.eclipse.scanning.points.validation.ValidatorService)1 RunnableDeviceServiceImpl (org.eclipse.scanning.sequencer.RunnableDeviceServiceImpl)1 Services (org.eclipse.scanning.server.servlet.Services)1 MockOperationService (org.eclipse.scanning.test.utilities.scan.mock.MockOperationService)1 BeforeClass (org.junit.BeforeClass)1