Example #1
0
        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");
        }
Example #2
0
        public void Test_GetChildWithName_Error7()
        {
            DirectoryPathRelative directoryPathRelative = new DirectoryPathRelative(@"..\Dir1\Dir2");

            directoryPathRelative.GetChildFileWithName(String.Empty);
        }
Example #3
0
        public void Test_GetChildWithName_Error6()
        {
            DirectoryPathRelative directoryPathRelative = new DirectoryPathRelative(@"..\Dir1\Dir2");

            directoryPathRelative.GetChildFileWithName(null);
        }
Example #4
0
 public void Test_GetChildWithName_Error7()
 {
     DirectoryPathRelative directoryPathRelative = new DirectoryPathRelative(@"..\Dir1\Dir2");
      directoryPathRelative.GetChildFileWithName(String.Empty);
 }
Example #5
0
 public void Test_GetChildWithName_Error6()
 {
     DirectoryPathRelative directoryPathRelative = new DirectoryPathRelative(@"..\Dir1\Dir2");
      directoryPathRelative.GetChildFileWithName(null);
 }
Example #6
0
        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");
        }