public void GetChildDirectoryByNameWithNull() { // Setup var fileSystem = new PathTree <string>(); var directory = new PathDirectory <string>(fileSystem, @"x:\mydirectory"); // Execute var result = directory.Directory(a_name: null); }
public void GetNotExistingChildDirectoryByName() { // Setup var fileSystem = new PathTree <string>(); fileSystem.CreateDirectory(@"x:\mydirectory\directory1"); fileSystem.CreateDirectory(@"x:\mydirectory\directory2\child"); fileSystem.CreateFile(@"x:\mydirectory\directory3\file.rgb", "Value"); var directory = new PathDirectory <string>(fileSystem, @"x:\mydirectory"); // Execute var result = directory.Directory("Directory4"); // Assert Assert.AreEqual("Directory4", result.Name); Assert.IsFalse(result.Exists); }
public void CustomTest_I() { var fileSystem = new PathTree <string>(); fileSystem.CreateDirectory(@"\Root\Directory"); fileSystem.CreateDirectory(@"\Root\Directory\Sub1"); fileSystem.CreateDirectory(@"\Root\Directory\Sub2"); fileSystem.CreateDirectory(@"\Root\Directory\Sub3"); fileSystem.CreateFile(@"\Root\Directory\File1.hsf", "Value"); fileSystem.CreateFile(@"\Root\Directory\File2.hsf", "Value"); fileSystem.CreateFile(@"\Root\Directory\File3.hsf", "Value"); var directory = new PathDirectory <string>(fileSystem, @"\"); var result = directory.Directory(@"Root\Directory\Sub1").Exists; Assert.IsTrue(result); }
public void GetNotExistingChildDirectoryByName() { // Setup var fileSystem = new PathTree<string>(); fileSystem.CreateDirectory(@"x:\mydirectory\directory1"); fileSystem.CreateDirectory(@"x:\mydirectory\directory2\child"); fileSystem.CreateFile(@"x:\mydirectory\directory3\file.rgb", "Value"); var directory = new PathDirectory<string>(fileSystem, @"x:\mydirectory"); // Execute var result = directory.Directory("Directory4"); // Assert Assert.AreEqual("Directory4", result.Name); Assert.IsFalse(result.Exists); }
public void GetChildDirectoryByNameWithNull() { // Setup var fileSystem = new PathTree<string>(); var directory = new PathDirectory<string>(fileSystem, @"x:\mydirectory"); // Execute var result = directory.Directory(a_name: null); }
public void CustomTest_I() { var fileSystem = new PathTree<string>(); fileSystem.CreateDirectory(@"\Root\Directory"); fileSystem.CreateDirectory(@"\Root\Directory\Sub1"); fileSystem.CreateDirectory(@"\Root\Directory\Sub2"); fileSystem.CreateDirectory(@"\Root\Directory\Sub3"); fileSystem.CreateFile(@"\Root\Directory\File1.hsf", "Value"); fileSystem.CreateFile(@"\Root\Directory\File2.hsf", "Value"); fileSystem.CreateFile(@"\Root\Directory\File3.hsf", "Value"); var directory = new PathDirectory<string>(fileSystem, @"\"); var result = directory.Directory(@"Root\Directory\Sub1").Exists; Assert.IsTrue(result); }