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

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

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