コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: Service1.cs プロジェクト: mgorski-zlatan/TRobotWCF
 /// <summary>
 /// Constructs a Service1 instance.
 /// </summary>
 public Service1()
 {
     devicesManager = new DevicesManager();
     devicesManager.ConnectAllDevices();
     dataReceiverFactory = new DataReceiverFactory(devicesManager);
 }
コード例 #4
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);
        }