mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 22:30:06 +00:00
Add warnings provider to settings
This commit is contained in:
parent
ea19de3e5f
commit
5ee2d10a1b
8 changed files with 234 additions and 144 deletions
|
|
@ -8,7 +8,7 @@ namespace provider
|
|||
{
|
||||
|
||||
static const std::string& kDefaultUrl {"https://warnings.allisonhouse.com"};
|
||||
static const std::string& kAlternateUrl {"http://warnings.cod.edu"};
|
||||
static const std::string& kAlternateUrl {"https://warnings.cod.edu"};
|
||||
|
||||
class WarningsProviderTest : public testing::TestWithParam<std::string>
|
||||
{
|
||||
|
|
@ -19,6 +19,12 @@ TEST_P(WarningsProviderTest, ListFiles)
|
|||
|
||||
auto [newObjects, totalObjects] = provider.ListFiles();
|
||||
|
||||
// No objects, skip test
|
||||
if (totalObjects == 0)
|
||||
{
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
EXPECT_GT(newObjects, 0);
|
||||
EXPECT_GT(totalObjects, 0);
|
||||
EXPECT_EQ(newObjects, totalObjects);
|
||||
|
|
@ -31,6 +37,12 @@ TEST_P(WarningsProviderTest, LoadUpdatedFiles)
|
|||
auto [newObjects, totalObjects] = provider.ListFiles();
|
||||
auto updatedFiles = provider.LoadUpdatedFiles();
|
||||
|
||||
// No objects, skip test
|
||||
if (totalObjects == 0)
|
||||
{
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
EXPECT_GT(newObjects, 0);
|
||||
EXPECT_GT(totalObjects, 0);
|
||||
EXPECT_EQ(newObjects, totalObjects);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue