| 7 | using namespace downloader; |
| 8 | |
| 9 | UNIT_TEST(MetaConfig_JSONParser_OldFormat) |
| 10 | { |
| 11 | std::string oldFormatJson = R"(["http://url1", "http://url2", "http://url3"])"; |
| 12 | auto result = ParseMetaConfig(oldFormatJson); |
| 13 | TEST(result.has_value(), ()); |
| 14 | TEST_EQUAL(result->m_serversList.size(), 3, ()); |
| 15 | TEST_EQUAL(result->m_serversList[0], "http://url1", ()); |
| 16 | TEST_EQUAL(result->m_serversList[1], "http://url2", ()); |
| 17 | TEST_EQUAL(result->m_serversList[2], "http://url3", ()); |
| 18 | TEST(result->m_settings.empty(), ()); |
| 19 | } |
| 20 | |
| 21 | UNIT_TEST(MetaConfig_JSONParser_InvalidJSON) |
| 22 | { |
nothing calls this directly
no test coverage detected