[FancyZones] Unit-tests fix: keeping user settings unchanged (#3500)

This commit is contained in:
Seraphima Zykova
2020-05-27 21:09:18 +03:00
committed by GitHub
parent ac6b9712ad
commit 5db1f91b01
5 changed files with 81 additions and 10 deletions

View File

@@ -16,14 +16,20 @@ namespace FancyZonesUnitTests
{
HINSTANCE m_hInst;
winrt::com_ptr<IFancyZonesSettings> m_settings;
const std::wstring_view m_moduleName = L"FancyZonesUnitTests";
TEST_METHOD_INITIALIZE(Init)
{
m_hInst = (HINSTANCE)GetModuleHandleW(nullptr);
m_settings = MakeFancyZonesSettings(m_hInst, L"FancyZonesUnitTests");
m_settings = MakeFancyZonesSettings(m_hInst, m_moduleName.data());
Assert::IsTrue(m_settings != nullptr);
}
TEST_METHOD_CLEANUP(CleanUp)
{
std::filesystem::remove_all(PTSettingsHelper::get_module_save_folder_location(m_moduleName));
}
TEST_METHOD (Create)
{
auto actual = MakeFancyZones(m_hInst, m_settings);