public void UnitedValueToBarSensorValueTest(SensorType sensorType)
        {
            var unitedValue = _sensorValuesFactory.BuildUnitedSensorValue(sensorType);

            var barSensorValue = unitedValue.Convert();

            SensorValuesTester.TestBarSensorFromUnitedSensor(unitedValue, barSensorValue);
        }
示例#2
0
        public void AddUnitedBarSensorValueTest(SensorType type)
        {
            var unitedValue = _sensorValuesFactory.BuildUnitedSensorValue(type, isMinEndTime: true);

            _monitoringCore.AddSensorsValues(new List <UnitedSensorValue>()
            {
                unitedValue
            });

            var lastBarValue = _barStorage.GetLastValue(_testProductName, unitedValue.Path);

            Assert.Equal(_testProductName, lastBarValue.ProductName);
            Assert.Equal(SensorValuesTester.GetSensorValueType(unitedValue), lastBarValue.ValueType);
            SensorValuesTester.TestBarSensorFromUnitedSensor(unitedValue, lastBarValue.Value);
        }