public void Test_GetChildWithName() { DirectoryPathAbsolute directoryPathAbsolute = new DirectoryPathAbsolute(@"C:\Dir1\Dir2"); Assert.IsTrue(directoryPathAbsolute.GetChildFileWithName("File.txt").Path == @"C:\Dir1\Dir2\File.txt"); Assert.IsTrue(directoryPathAbsolute.GetChildDirectoryWithName("Dir3").Path == @"C:\Dir1\Dir2\Dir3"); DirectoryPathRelative directoryPathRelative = new DirectoryPathRelative(@"..\..\Dir1\Dir2"); Assert.IsTrue(directoryPathRelative.GetChildFileWithName("File.txt").Path == @"..\..\Dir1\Dir2\File.txt"); Assert.IsTrue(directoryPathRelative.GetChildDirectoryWithName("Dir3").Path == @"..\..\Dir1\Dir2\Dir3"); }
public void Test_GetChildWithName_Error7() { DirectoryPathRelative directoryPathRelative = new DirectoryPathRelative(@"..\Dir1\Dir2"); directoryPathRelative.GetChildFileWithName(String.Empty); }
public void Test_GetChildWithName_Error6() { DirectoryPathRelative directoryPathRelative = new DirectoryPathRelative(@"..\Dir1\Dir2"); directoryPathRelative.GetChildFileWithName(null); }