Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
 /// <summary>
 /// Constructs a Service1 instance.
 /// </summary>
 public Service1()
 {
     devicesManager = new DevicesManager();
     devicesManager.ConnectAllDevices();
     dataReceiverFactory = new DataReceiverFactory(devicesManager);
 }