Beispiel #1
0
        public void DeleteEmptyDirectoriesTest()
        {
            var path = @"C:\Garb\Test\Whatever";

            FileEx.EnsureDirectory(path);

            FileEx.DeleteEmptyDirectories(path);
        }
Beispiel #2
0
        public void EnsureDirectoryTest()
        {
            var path = @"C:\Garb\Test\Whatever";

            // If the directory exists, delete it so we can test the Ensure works correctly.
            FileEx.DeleteDirectory(path);

            Assert.IsFalse(Directory.Exists(path));

            FileEx.EnsureDirectory(path);
            Assert.IsTrue(Directory.Exists(path));

            FileEx.EnsureDirectory(path);
            Assert.IsTrue(Directory.Exists(path));
        }