Beispiel #1
0
 public void SimpleCommonRoot()
 {
     PathOperations.FindCommonRoot(new[]
     {
         Path.Combine("a", "1.txt"),
         Path.Combine("a", "2.txt")
     })
     .Should().Be("a" + Path.DirectorySeparatorChar);
 }
Beispiel #2
0
 public void CommonRootWithDifferentSubDirs()
 {
     PathOperations.FindCommonRoot(new[] { @"a\b\1.txt", @"a\c\2.txt" }).Should().Be(@"a\");
     PathOperations.FindCommonRoot(new[] { @"a\b\1.txt", @"a\c\2.txt", @"a\3.txt" }).Should().Be(@"a\");
 }
Beispiel #3
0
 public void SimpleCommonRoot()
 {
     PathOperations.FindCommonRoot(new[] { @"a\1.txt", @"a\2.txt" }).Should().Be(@"a\");
 }
Beispiel #4
0
 public void SingleFile()
 {
     PathOperations.FindCommonRoot(new[] { @"a\b\c\x.y" }).Should().Be(@"a\b\c\");
 }
Beispiel #5
0
 public void EmptySet()
 {
     PathOperations.FindCommonRoot(new string[0]).Should().BeEmpty();
 }
Beispiel #6
0
 public void CommonRootWithDifferentSubDirs()
 {
     PathOperations.FindCommonRoot(new[] { Path.Combine("a", "b", "1.txt"), Path.Combine("a", "c", "2.txt") }).Should().Be("a" + Path.DirectorySeparatorChar);
     PathOperations.FindCommonRoot(new[] { Path.Combine("a", "b", "1.txt"), Path.Combine("a", "c", "2.txt"), Path.Combine("a", "3.txt") }).Should().Be("a" + Path.DirectorySeparatorChar);
 }
Beispiel #7
0
 public void SingleFile()
 {
     PathOperations.FindCommonRoot(new[] { Path.Combine("a", "b", "c", "x.y") })
     .Should().Be(Path.Combine("a", "b", "c") + Path.DirectorySeparatorChar);
 }