public void GetTemperatureDataReceiverTest() { // Given DataReceiverFactory dataReceiverFactory = new DataReceiverFactory(devicesManager); SelectedDevice dataReceiverType = SelectedDevice.Temperature; // When IDataReceiver dataReceiver = dataReceiverFactory.GetDataReceiver(dataReceiverType); // Then Assert.IsTrue(dataReceiver is TemperatureDataReceiver); }
public void GetEncoderDataReceiverTest() { // Given DataReceiverFactory dataReceiverFactory = new DataReceiverFactory(devicesManager); SelectedDevice dataReceiverType = SelectedDevice.Encoder; // When IDataReceiver dataReceiver = dataReceiverFactory.GetDataReceiver(dataReceiverType); // Then Assert.IsTrue(dataReceiver is EncoderDataReceiver); }
public void GetSharpSensorsDataReceiverTest() { // Given DataReceiverFactory dataReceiverFactory = new DataReceiverFactory(devicesManager); SelectedDevice dataReceiverType = SelectedDevice.Sharp; // When IDataReceiver dataReceiver = dataReceiverFactory.GetDataReceiver(dataReceiverType); // Then Assert.IsTrue(dataReceiver is SharpSensorsDataReceiver); }
/// <summary> /// Constructs a Service1 instance. /// </summary> public Service1() { devicesManager = new DevicesManager(); devicesManager.ConnectAllDevices(); dataReceiverFactory = new DataReceiverFactory(devicesManager); }