public void RecordEnvironmentalSnapshot(EnvironmentSnapshot snapshot)
 {
     if (!Temperature.ContainsKey(snapshot.StorageSiteId))
     {
         Temperature.Add(snapshot.StorageSiteId, new List <DataPoint>());
     }
     if (!Humidity.ContainsKey(snapshot.StorageSiteId))
     {
         Humidity.Add(snapshot.StorageSiteId, new List <DataPoint>());
     }
     if (snapshot.Temperature.HasValue)
     {
         Temperature[snapshot.StorageSiteId].Add(new DataPoint()
         {
             Timestamp = snapshot.Timestamp,
             Value     = snapshot.Temperature.Value
         });
     }
     if (snapshot.Humidity.HasValue)
     {
         Humidity[snapshot.StorageSiteId].Add(new DataPoint()
         {
             Timestamp = snapshot.Timestamp,
             Value     = snapshot.Humidity.Value
         });
     }
 }
Example #2
0
 public void AddTestNullpunkt()
 {
     tK = tK.Add(-tDiff, TemperaturEinheit.Kelvin);
     Assert.AreEqual(tKErwartet, tK.Kelvin, $"Test in {TemperaturEinheit.Kelvin}");
 }