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

            directoryPathRelative.GetChildDirectoryWithName(String.Empty);
        }
Exemple #3
0
        public void Test_GetChildWithName_Error8()
        {
            DirectoryPathRelative directoryPathRelative = new DirectoryPathRelative(@"..\Dir1\Dir2");

            directoryPathRelative.GetChildDirectoryWithName(null);
        }
 public void Test_GetChildWithName_Error9()
 {
     DirectoryPathRelative directoryPathRelative = new DirectoryPathRelative(@"..\Dir1\Dir2");
      directoryPathRelative.GetChildDirectoryWithName(String.Empty);
 }
 public void Test_GetChildWithName_Error8()
 {
     DirectoryPathRelative directoryPathRelative = new DirectoryPathRelative(@"..\Dir1\Dir2");
      directoryPathRelative.GetChildDirectoryWithName(null);
 }
        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");
        }