mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 08:00:06 +00:00
Add IEM warnings provider test
This commit is contained in:
parent
59a8fdbf56
commit
f06191f290
2 changed files with 35 additions and 0 deletions
34
test/source/scwx/provider/iem_warnings_provider.test.cpp
Normal file
34
test/source/scwx/provider/iem_warnings_provider.test.cpp
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#include <scwx/provider/iem_warnings_provider.hpp>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace provider
|
||||
{
|
||||
|
||||
TEST(IemWarningsProviderTest, LoadUpdatedFiles)
|
||||
{
|
||||
using namespace std::chrono;
|
||||
using sys_days = time_point<system_clock, days>;
|
||||
|
||||
IemWarningsProvider provider {};
|
||||
|
||||
auto date = sys_days {2023y / March / 25d};
|
||||
|
||||
auto torProducts = provider.ListTextProducts(date, {}, "TOR");
|
||||
|
||||
EXPECT_EQ(torProducts.size(), 35);
|
||||
|
||||
if (torProducts.size() >= 1)
|
||||
{
|
||||
EXPECT_EQ(torProducts.at(0), "202303250016-KMEG-WFUS54-TORMEG");
|
||||
}
|
||||
if (torProducts.size() >= 35)
|
||||
{
|
||||
EXPECT_EQ(torProducts.at(34), "202303252015-KFFC-WFUS52-TORFFC");
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace provider
|
||||
} // namespace scwx
|
||||
Loading…
Add table
Add a link
Reference in a new issue