Esempio n. 1
0
        public void TestTempDirAttachDetatch()
        {
            string path;

            using (TempDirectory d = new TempDirectory())
            {
                Assert.IsTrue(Directory.Exists(d.TempPath));
                path = d.Detatch();
            }
            Assert.IsTrue(Directory.Exists(path));
            using (TempDirectory d = TempDirectory.Attach(path))
            {
                Assert.IsTrue(Directory.Exists(path));
            }
            Assert.IsFalse(Directory.Exists(path));
        }