public void TestDetach() { TempFile filea = new TempFile(); string path = filea.TempPath; Assert.IsTrue(File.Exists(path)); Assert.AreEqual(path, filea.Detatch()); Assert.IsTrue(File.Exists(path)); filea.Dispose(); Assert.IsTrue(File.Exists(path)); File.Delete(path); }