private void TestSensorDataFromCache(SensorValueBase sensorValue, GetValuesFromCache getCachedValues) { var sensorDataFromCache = getCachedValues?.Invoke(new List <string>(1) { _testProductName }) ?.FirstOrDefault(s => s.Path == sensorValue.Path); _sensorValuesTester.TestSensorDataFromCache(sensorValue, sensorDataFromCache); }
private void TestSeveralSensorDataFromCache(Dictionary <string, List <SensorValueBase> > sensorValues, GetValuesFromCache getValuesFromCache) { var cache = getValuesFromCache?.Invoke(new List <string>(1) { _testProductName }) ?.ToDictionary(s => s.Path); foreach (var sensors in sensorValues) { _sensorValuesTester.TestSensorDataFromCache(sensors.Value.LastOrDefault(), cache[sensors.Key]); } }