Esempio n. 1
0
        private static (SensorDataEntity, SensorInfo) BuildDatasForTests(SensorType sensorType, bool withComment = true)
        {
            var sensorDataEntity = SensorDataEntitiesFactory.BuildSensorDataEntity(sensorType, withComment);
            var sensorInfo       = SensorInfoFactory.BuildSensorInfo(_productName, sensorDataEntity.DataType);

            return(sensorDataEntity, sensorInfo);
        }
        public void UpdateSensorInfo_NonExistingProduct_Test()
        {
            var sensorInfo = SensorInfoFactory.BuildSensorInfo(_testProductName, RandomGenerator.GetRandomByte());

            _monitoringCore.UpdateSensorInfo(sensorInfo);

            FullTestNonExistingSensorInfo(_testProductName,
                                          sensorInfo.Path,
                                          _monitoringCore.IsSensorRegistered,
                                          _monitoringCore.GetSensorInfo,
                                          _monitoringCore.GetProductSensors,
                                          _databaseAdapterManager.DatabaseAdapter.GetSensorInfo);
        }