Exemplo n.º 1
0
        public void TestStringPathBuilder_WhenBuilt_ShouldNotFail(bool hasRoot, string[] parts, string expected)
        {
            StringVector path = new StringVectorBuilder()
                                .SetHasRoot(hasRoot)
                                .Add(parts)
                                .Build();

            path.ToString().Should().Be(expected);
            expected.Should().Be(path);
        }
Exemplo n.º 2
0
        public void TestPartPatternsFailures(string value, string[] expectedParts, bool hasRoot)
        {
            StringVector subject = new StringVectorBuilder().Parse(value).Build();

            subject
            .Zip(expectedParts, (o, i) => (o, i))
            .All(x => x.o == x.i)
            .Should().BeTrue();

            subject.HasRoot.Should().Be(!hasRoot);
        }