Exemplo n.º 1
0
        public void WalkUp_RelativePath_Exists1()
        {
            // arrange
            var dir = new DirectoryEx(".\\Sample")
                      .GetNestedDirectory("KSW Doradztwo\\2018\\\\PZ Solutions\\2018");

            // act
            var results = dir.WalkUp().ToArray();

            // assert
            results.Should().HaveCount(3);
            results[0].Name.Should().Be("2018");
            results[1].Name.Should().Be("PZ Solutions");
            results[2].Name.Should().Be($"{Path.DirectorySeparatorChar}");
        }