Skip to content

Commit

Permalink
Merge pull request #18 from erenken/work/update
Browse files Browse the repository at this point in the history
Work/update
  • Loading branch information
erenken authored May 13, 2023
2 parents ed8452b + 6821c50 commit 6aefac0
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using Microsoft.Extensions.DependencyInjection;
using myNOC.WeatherLink;
using myNOC.WeatherLink.JsonConverters;
using myNOC.WeatherLink.Models.Sensors;
using myNOC.WeatherLink.Processors;
using myNOC.WeatherLink.Responses;
using myNOC.WeatherLink.Sensors.Data;
using System.Text;
using System.Text.Json;

Expand Down Expand Up @@ -38,9 +40,14 @@ public void CalculateHighLowTest()

// Act
var result = highLowProcessor.CalculateHighLow(response!);
var vantage = result.Sensors.FirstOrDefault(x => x?.Type == myNOC.WeatherLink.Models.Sensors.Data.SensorType.VantagePro2Plus
&& x.DataStructure == myNOC.WeatherLink.Models.Sensors.Data.DataStructureType.ISSArchiveRecord) as Sensor<VantagePro2PlusArchive>;

// Assert
Assert.IsNotNull(result);
Assert.IsNotNull(vantage);
Assert.AreEqual(0.24f, vantage.Data!.First().RainRateHigh_in);
Assert.AreEqual(new DateTime(2023, 3, 17, 4, 17, 12, DateTimeKind.Utc), vantage.Data!.First().RainRateHighAt);
}
}
}

0 comments on commit 6aefac0

Please sign in to comment.