public void DeleteEmptyDirectoriesTest() { var path = @"C:\Garb\Test\Whatever"; FileEx.EnsureDirectory(path); FileEx.DeleteEmptyDirectories(path); }
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)); }