// ReSharper disable once NotNullMemberIsNotInitialized public WorkingDir([NotNull] string testname, bool useRamdisk = true) { PreviousCurrentDir = Environment.CurrentDirectory; _lastDirectory = InitializeWorkingDirectory(testname, useRamdisk); Logger.Get().ClearOldErrors(); Logger.SetLogFilePath(Path.Combine(_lastDirectory, "Log.Unittest.txt")); Logger.Threshold = Severity.Debug; InitializeDataLogging(); GC.Collect(); GC.WaitForPendingFinalizers(); GC.Collect(); }