From ffc9cb20d163deaf249387a5b794fff10d0d392b Mon Sep 17 00:00:00 2001 From: John Andrews Date: Sat, 31 Aug 2024 16:35:12 +1200 Subject: [PATCH] test cleanup --- PluginTestLibrary/_TestBase.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PluginTestLibrary/_TestBase.cs b/PluginTestLibrary/_TestBase.cs index 3723936c..d6726a31 100644 --- a/PluginTestLibrary/_TestBase.cs +++ b/PluginTestLibrary/_TestBase.cs @@ -57,7 +57,7 @@ public abstract class TestBase tempPath = Path.GetTempPath(); TempPath = System.IO.Path.Combine(tempPath, Guid.NewGuid().ToString()); System.IO.Directory.CreateDirectory(TempPath); - TempFile = System.IO.Path.Combine(TempPath, Guid.NewGuid() + ".txt"); + TempFile = System.IO.Path.Combine(TempPath, "tests", Guid.NewGuid() + ".txt"); System.IO.File.WriteAllText(TempFile, Guid.NewGuid().ToString()); if (Directory.Exists(this.TempPath) == false) @@ -70,7 +70,8 @@ public abstract class TestBase public void CleanUp() { TestCleanUp(); - TestContext.WriteLine(Logger.ToString()); + if (Directory.Exists(TempPath)) + Directory.Delete(TempPath, true); } protected virtual void TestStarting()