mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 07:50:04 +00:00
Add NEXRAD data provider function to get time points by date
This commit is contained in:
parent
3bee6f65e5
commit
a9f5a766cc
4 changed files with 83 additions and 9 deletions
|
|
@ -66,6 +66,26 @@ TEST(AwsLevel3DataProvider, GetAvailableProducts)
|
|||
EXPECT_GT(products.size(), 0);
|
||||
}
|
||||
|
||||
TEST(AwsLevel3DataProvider, GetTimePointsByDate)
|
||||
{
|
||||
using namespace std::chrono;
|
||||
using sys_days = time_point<system_clock, days>;
|
||||
|
||||
const auto date = sys_days {2021y / May / 27d};
|
||||
const auto tomorrow = date + days {1};
|
||||
|
||||
AwsLevel3DataProvider provider("KLSX", "N0Q");
|
||||
|
||||
auto timePoints = provider.GetTimePointsByDate(date);
|
||||
|
||||
EXPECT_GT(timePoints.size(), 0);
|
||||
for (auto timePoint : timePoints)
|
||||
{
|
||||
EXPECT_GE(timePoint, date);
|
||||
EXPECT_LT(timePoint, tomorrow);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(AwsLevel3DataProvider, TimePointValid)
|
||||
{
|
||||
using namespace std::chrono;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue