public void TempDirectory() { var dir = new DataManager.TemporaryDirectory(); DirectoryInfo info = dir.Directory; var stream = File.Create(Path.Combine(dir.Directory.FullName, "test.tmp")); stream.Close(); dir = null; GC.Collect(); Assert.False(info.Exists); }