Index: Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs
===================================================================
diff -u -rac96d7c315129af851634ed5a4a6800b59ede718 -rfb6ca0c708e591684db8b4e877ec4c38b094b5c9
--- Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs (.../TestHelperTest.cs) (revision ac96d7c315129af851634ed5a4a6800b59ede718)
+++ Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs (.../TestHelperTest.cs) (revision fb6ca0c708e591684db8b4e877ec4c38b094b5c9)
@@ -177,7 +177,7 @@
string actualPath = TestHelper.GetScratchPadPath();
// Assert
- string expectedPath = Path.Combine(TestHelper.SolutionRoot, "Scratchpad");
+ string expectedPath = Path.Combine(Path.GetTempPath(), "Ringtoets_Scratchpad");
Assert.AreEqual(expectedPath, actualPath);
Assert.IsTrue(Directory.Exists(actualPath),
$"The directory '{expectedPath}' should exist, such that unit tests have a clean environment to temporarily write files and directories to.");
@@ -193,7 +193,7 @@
string actualPath = TestHelper.GetScratchPadPath(subPath);
// Assert
- string expectedPath = Path.Combine(TestHelper.SolutionRoot, "Scratchpad", subPath);
+ string expectedPath = Path.Combine(Path.GetTempPath(), "Ringtoets_Scratchpad", subPath);
Assert.AreEqual(expectedPath, actualPath);
Assert.IsFalse(File.Exists(actualPath),
$"The file '{expectedPath}' should not exist, as the folder should always be empty at the start of any unit test.");
Index: Core/Common/test/Core.Common.TestUtil/TestHelper.cs
===================================================================
diff -u -r569a286badd9b3494f5465cc2767a8cf6a77f618 -rfb6ca0c708e591684db8b4e877ec4c38b094b5c9
--- Core/Common/test/Core.Common.TestUtil/TestHelper.cs (.../TestHelper.cs) (revision 569a286badd9b3494f5465cc2767a8cf6a77f618)
+++ Core/Common/test/Core.Common.TestUtil/TestHelper.cs (.../TestHelper.cs) (revision fb6ca0c708e591684db8b4e877ec4c38b094b5c9)
@@ -58,14 +58,13 @@
///
/// The folder path.
/// Caller is responsible for cleaning up files put in the folder.
- /// Thrown when the folder doesn't exist.
///
public static string GetScratchPadPath()
{
- string scratchPadPath = Path.Combine(Path.GetDirectoryName(SolutionRoot), "Scratchpad");
+ string scratchPadPath = Path.Combine(Path.GetTempPath(), "Ringtoets_Scratchpad");
if (!Directory.Exists(scratchPadPath))
{
- throw new IOException("The 'Scratchpad' folder has been deleted from the trunk, while tests require the existence of this folder for writing to disk temporarily.");
+ Directory.CreateDirectory(scratchPadPath);
}
return scratchPadPath;
}
@@ -76,7 +75,6 @@
/// The file or folder path inside the 'scratchpad' folder.
/// The folder path.
/// Caller is responsible for cleaning up files put in the folder.
- /// Thrown when the folder doesn't exist.
///
public static string GetScratchPadPath(string path)
{
Fisheye: Tag fb6ca0c708e591684db8b4e877ec4c38b094b5c9 refers to a dead (removed) revision in file `Scratchpad/dummy.txt'.
Fisheye: No comparison available. Pass `N' to diff?