private static void FullTestSensorInfo(string productName, SensorValueBase sensorValue, IsSensorRegistered isSensorRegistered,
                                               GetSensorInfo getSensorInfo, GetProductSensors getProductSensors, GetSensorInfoFromDB getSensorFromDB, SensorValuesTester tester)
        {
            var sensorValuePath = sensorValue.Path;

            Assert.True(isSensorRegistered(productName, sensorValuePath));
            tester.TestSensorInfoFromDB(sensorValue, getSensorInfo(productName, sensorValuePath));
            tester.TestSensorInfoFromDB(sensorValue, getProductSensors(productName).FirstOrDefault(s => s.Path == sensorValuePath));
            tester.TestSensorInfoFromDB(sensorValue, getSensorFromDB(productName, sensorValuePath));
        }
        public void SensorValueToSensorInfoConverterTest(SensorType type)
        {
            var sensorValue = _sensorValuesFactory.BuildSensorValue(type);

            var sensorInfo = sensorValue.Convert(_productName);

            _sensorValuesTester.TestSensorInfoFromDB(sensorValue, sensorInfo);
        }
        private static void FullTestRemovedSensor(string productName, SensorValueBase sensorValue,
                                                  IsSensorRegistered isSensorRegistered, GetSensorInfo getSensorInfo, GetProductSensors getProductSensors,
                                                  GetQueueValues getQueueValues, GetAllSensorHistory getAllSensorHistory,
                                                  GetSensorInfoFromDB getSensorFromDB, SensorValuesTester tester)
        {
            string sensorValuePath = sensorValue.Path;

            Assert.False(isSensorRegistered(productName, sensorValuePath));
            Assert.Null(getSensorInfo(productName, sensorValuePath));
            Assert.Null(getProductSensors(productName).FirstOrDefault(s => s.Path == sensorValuePath));
            Assert.Empty(getQueueValues(new List <string>()
            {
                productName
            }));
            Assert.Empty(getAllSensorHistory(productName, sensorValuePath));
            tester.TestSensorInfoFromDB(sensorValue, getSensorFromDB(productName, sensorValuePath));
        }