#include <gtest/gtest.h>
#include <UpdateCheckerBase.h>
#include <filesystem>
#include <fstream>
#include <queue>
Functions | |
EXPECT_EQ (state->UpdateStatus, UpdateCheckerMock::Status::UpdateInProgress) | |
if (dismiss_window==true) | |
state | FinishPendingTasks () |
mockDll | seekg (0, std::ios::end) |
content | resize (mockDll.tellg()) |
mockDll | seekg (0, std::ios::beg) |
mockDll | read (content.data(), content.size()) |
EXPECT_EQ (content, "DATA_IN_NEW_VERSION") | |
TEST_P (UpdateCheckerTestFixture, Update_RenameFailure) | |
TEST_P (UpdateCheckerTestFixture, Update_TempFileFailure) | |
TEST_P (UpdateCheckerTestFixture, Update_HttpError) | |
TEST_P (UpdateCheckerTestFixture, Install_Positive) | |
TEST_P (UpdateCheckerTestFixture, Install_HttpError) | |
TEST_P (UpdateCheckerTestFixture, CheckForUpdate_NoUpdate) | |
TEST_P (UpdateCheckerTestFixture, CheckForUpdate_BadJson) | |
TEST_P (UpdateCheckerTestFixture, CheckForUpdate_NoReleases) | |
INSTANTIATE_TEST_SUITE_P (Stable, UpdateCheckerTestFixture, ::testing::Values(std::make_pair(false, false), std::make_pair(false, true))) | |
INSTANTIATE_TEST_SUITE_P (PreRelease, UpdateCheckerTestFixture, ::testing::Values(std::make_pair(true, false), std::make_pair(true, true))) | |
Variables | |
mUpdater PerformInstallOrUpdate * | state |
else | |
std::string | content |
EXPECT_EQ | ( | content | , |
"DATA_IN_NEW_VERSION" | |||
) |
EXPECT_EQ | ( | state-> | UpdateStatus, |
UpdateCheckerMock::Status::UpdateInProgress | |||
) |
state FinishPendingTasks | ( | ) |
if | ( | dismiss_window | = = true | ) |
INSTANTIATE_TEST_SUITE_P | ( | PreRelease | , |
UpdateCheckerTestFixture | , | ||
::testing::Values(std::make_pair(true, false), std::make_pair(true, true)) | |||
) |
INSTANTIATE_TEST_SUITE_P | ( | Stable | , |
UpdateCheckerTestFixture | , | ||
::testing::Values(std::make_pair(false, false), std::make_pair(false, true)) | |||
) |
mockDll read | ( | content. | data(), |
content. | size() | ||
) |
content resize | ( | mockDll. | tellg() | ) |
mockDll seekg | ( | 0 | , |
std::ios::beg | |||
) |
mockDll seekg | ( | 0 | , |
std::ios::end | |||
) |
TEST_P | ( | UpdateCheckerTestFixture | , |
CheckForUpdate_BadJson | |||
) |
TEST_P | ( | UpdateCheckerTestFixture | , |
CheckForUpdate_NoReleases | |||
) |
TEST_P | ( | UpdateCheckerTestFixture | , |
CheckForUpdate_NoUpdate | |||
) |
TEST_P | ( | UpdateCheckerTestFixture | , |
Install_HttpError | |||
) |
TEST_P | ( | UpdateCheckerTestFixture | , |
Install_Positive | |||
) |
TEST_P | ( | UpdateCheckerTestFixture | , |
Update_HttpError | |||
) |
TEST_P | ( | UpdateCheckerTestFixture | , |
Update_RenameFailure | |||
) |
TEST_P | ( | UpdateCheckerTestFixture | , |
Update_TempFileFailure | |||
) |
std::string content |
else |
mUpdater PerformInstallOrUpdate* state |