Skip to content

Commit

Permalink
[FancyZones Unit tests] removed temp files check (#8127)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeraphimaZykova committed Nov 19, 2020
1 parent b3abebc commit 9144123
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions src/modules/fancyzones/tests/UnitTests/ZoneWindow.Spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,6 @@ namespace FancyZonesUnitTests
m_parentUniqueId << L"DELA026#5&10a58c63&0&UID16777488_" << m_monitorInfo.rcMonitor.right << "_" << m_monitorInfo.rcMonitor.bottom << "_{61FA9FC0-26A6-4B37-A834-491C148DFC57}";
m_uniqueId << L"DELA026#5&10a58c63&0&UID16777488_" << m_monitorInfo.rcMonitor.right << "_" << m_monitorInfo.rcMonitor.bottom << "_{39B25DD2-130D-4B5D-8851-4791D66B1539}";

Assert::IsFalse(m_fancyZonesData.activeZoneSetTmpFileName.empty());
Assert::IsFalse(m_fancyZonesData.appliedZoneSetTmpFileName.empty());
Assert::IsFalse(m_fancyZonesData.deletedCustomZoneSetsTmpFileName.empty());

Assert::IsFalse(std::filesystem::exists(m_fancyZonesData.activeZoneSetTmpFileName));
Assert::IsFalse(std::filesystem::exists(m_fancyZonesData.appliedZoneSetTmpFileName));
Assert::IsFalse(std::filesystem::exists(m_fancyZonesData.deletedCustomZoneSetsTmpFileName));

m_fancyZonesData.SetSettingsModulePath(L"FancyZonesUnitTests");
m_fancyZonesData.clear_data();

Expand All @@ -109,14 +101,6 @@ namespace FancyZonesUnitTests
m_virtualDesktopGuid = *guid;
}

TEST_METHOD_CLEANUP(Cleanup)
{
//cleanup temp files if were created
std::filesystem::remove(m_fancyZonesData.activeZoneSetTmpFileName);
std::filesystem::remove(m_fancyZonesData.appliedZoneSetTmpFileName);
std::filesystem::remove(m_fancyZonesData.deletedCustomZoneSetsTmpFileName);
}

TEST_METHOD(CreateZoneWindow)
{
auto zoneWindow = MakeZoneWindow(winrt::make_self<MockZoneWindowHost>().get(), m_hInst, m_monitor, m_uniqueId.str(), {});
Expand Down Expand Up @@ -457,26 +441,10 @@ namespace FancyZonesUnitTests

m_uniqueId << L"DELA026#5&10a58c63&0&UID16777488_" << m_monitorInfo.rcMonitor.right << "_" << m_monitorInfo.rcMonitor.bottom << "_{39B25DD2-130D-4B5D-8851-4791D66B1539}";

Assert::IsFalse(m_fancyZonesData.activeZoneSetTmpFileName.empty());
Assert::IsFalse(m_fancyZonesData.appliedZoneSetTmpFileName.empty());
Assert::IsFalse(m_fancyZonesData.deletedCustomZoneSetsTmpFileName.empty());

Assert::IsFalse(std::filesystem::exists(m_fancyZonesData.activeZoneSetTmpFileName));
Assert::IsFalse(std::filesystem::exists(m_fancyZonesData.appliedZoneSetTmpFileName));
Assert::IsFalse(std::filesystem::exists(m_fancyZonesData.deletedCustomZoneSetsTmpFileName));

m_fancyZonesData.SetSettingsModulePath(L"FancyZonesUnitTests");
m_fancyZonesData.clear_data();
}

TEST_METHOD_CLEANUP(Cleanup)
{
//cleanup temp files if were created
std::filesystem::remove(m_fancyZonesData.activeZoneSetTmpFileName);
std::filesystem::remove(m_fancyZonesData.appliedZoneSetTmpFileName);
std::filesystem::remove(m_fancyZonesData.deletedCustomZoneSetsTmpFileName);
}

public:
TEST_METHOD(MoveSizeEnter)
{
Expand Down

0 comments on commit 9144123

Please sign in to comment.