mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[CI] FancyZones unit tests (#17910)
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
|
||||
#include <FancyZonesLib/FancyZonesData.h>
|
||||
#include <FancyZonesLib/FancyZonesData/AppliedLayouts.h>
|
||||
#include <FancyZonesLib/FancyZonesData/CustomLayouts.h>
|
||||
#include <FancyZonesLib/FancyZonesData/LayoutHotkeys.h>
|
||||
#include <FancyZonesLib/FancyZonesData/LayoutTemplates.h>
|
||||
#include <FancyZonesLib/util.h>
|
||||
|
||||
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||||
@@ -13,6 +16,7 @@ namespace FancyZonesUnitTests
|
||||
{
|
||||
FancyZonesData& m_fzData = FancyZonesDataInstance();
|
||||
std::wstring m_testFolder = L"FancyZonesUnitTests";
|
||||
std::wstring m_testFolderPath = PTSettingsHelper::get_module_save_folder_location(m_testFolder);
|
||||
|
||||
TEST_METHOD_INITIALIZE(Init)
|
||||
{
|
||||
@@ -21,8 +25,12 @@ namespace FancyZonesUnitTests
|
||||
|
||||
TEST_METHOD_CLEANUP(CleanUp)
|
||||
{
|
||||
std::filesystem::remove_all(AppliedLayouts::AppliedLayoutsFileName());
|
||||
std::filesystem::remove_all(PTSettingsHelper::get_module_save_folder_location(m_testFolder));
|
||||
// Move...FromZonesSettings creates all of these files, clean up
|
||||
std::filesystem::remove(AppliedLayouts::AppliedLayoutsFileName());
|
||||
std::filesystem::remove(CustomLayouts::CustomLayoutsFileName());
|
||||
std::filesystem::remove(LayoutHotkeys::LayoutHotkeysFileName());
|
||||
std::filesystem::remove(LayoutTemplates::LayoutTemplatesFileName());
|
||||
std::filesystem::remove_all(m_testFolderPath);
|
||||
AppliedLayouts::instance().LoadData(); // clean data
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user