forked from organicmaps/organicmaps
[new downloader] Tests on Storage::GetUpdateInfo().
This commit is contained in:
parent
101559e7ab
commit
5dbf0c01f9
1 changed files with 23 additions and 0 deletions
|
@ -1296,6 +1296,29 @@ UNIT_TEST(StorageTest_GetNodeAttrsSingleMwm)
|
|||
TEST(!nodeAttrs.m_present, ());
|
||||
}
|
||||
|
||||
UNIT_TEST(StorageTest_GetUpdateInfoSingleMwm)
|
||||
{
|
||||
Storage storage(kSingleMwmCountriesTxt, make_unique<TestMapFilesDownloader>());
|
||||
|
||||
Storage::UpdateInfo updateInfo;
|
||||
|
||||
storage.GetUpdateInfo("Abkhazia", updateInfo);
|
||||
TEST_EQUAL(updateInfo.m_numberOfMwmFilesToUpdate, 0, ());
|
||||
TEST_EQUAL(updateInfo.m_totalUpdateSizeInBytes, 0, ());
|
||||
|
||||
storage.GetUpdateInfo("Country1", updateInfo);
|
||||
TEST_EQUAL(updateInfo.m_numberOfMwmFilesToUpdate, 0, ());
|
||||
TEST_EQUAL(updateInfo.m_totalUpdateSizeInBytes, 0, ());
|
||||
|
||||
storage.GetUpdateInfo("Disputable Territory", updateInfo);
|
||||
TEST_EQUAL(updateInfo.m_numberOfMwmFilesToUpdate, 0, ());
|
||||
TEST_EQUAL(updateInfo.m_totalUpdateSizeInBytes, 0, ());
|
||||
|
||||
storage.GetUpdateInfo(storage.GetRootId(), updateInfo);
|
||||
TEST_EQUAL(updateInfo.m_numberOfMwmFilesToUpdate, 0, ());
|
||||
TEST_EQUAL(updateInfo.m_totalUpdateSizeInBytes, 0, ());
|
||||
}
|
||||
|
||||
UNIT_TEST(StorageTest_ParseStatus)
|
||||
{
|
||||
TEST_EQUAL(StatusAndError(NodeStatus::Undefined, NodeErrorCode::NoError),
|
||||
|
|
Loading…
Add table
Reference in a new issue