public void GetBatteryDataReceiverTest() { // Given DataReceiverFactory dataReceiverFactory = new DataReceiverFactory(devicesManager); SelectedDevice dataReceiverType = SelectedDevice.Battery; // When IDataReceiver dataReceiver = dataReceiverFactory.GetDataReceiver(dataReceiverType); // Then Assert.IsTrue(dataReceiver is BatteryDataReceiver); }
public void GetMobotSensorDataReceiverTest() { // Given DataReceiverFactory dataReceiverFactory = new DataReceiverFactory(devicesManager); SelectedDevice dataReceiverType = SelectedDevice.Mobot; // When IDataReceiver dataReceiver = dataReceiverFactory.GetDataReceiver(dataReceiverType); // Then Assert.IsTrue(dataReceiver is MobotSensorDataReceiver); }
/// <summary> /// Constructs a Service1 instance. /// </summary> public Service1() { devicesManager = new DevicesManager(); devicesManager.ConnectAllDevices(); dataReceiverFactory = new DataReceiverFactory(devicesManager); }
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); }