Ejemplo n.º 1
0
        //
        // ASSERT HELPERS
        //

        internal void AssertMatchIfNextSucceeds(PathDefinitionStep step, Path path, int expectedMatchLength = 1)
        {
            var a = new PathAssert(step, path);

            a.AssertMatchWith(PathAssert.SucceedingNextStep);

            a.AssertNoMatchWith(
                PathAssert.FailingNextStep,
                "The step returned a successful match even though the next step returned a failure."
                );

            a.AssertMatchLengthWith(PathAssert.SucceedingNextStep, expectedMatchLength);
            a.AssertMatchLengthWith(PathAssert.FailingNextStep, expectedMatchLength);

            a.AssertIteratorWasIncremented(expectedMatchLength);
        }
Ejemplo n.º 2
0
        internal void AssertNoMatch(PathDefinitionStep step, Path path)
        {
            var a = new PathAssert(step, path);

            a.AssertNoMatchWith(PathAssert.SucceedingNextStep);
            a.AssertMatchLengthWith(PathAssert.SucceedingNextStep, expectedLength: 0);
            a.AssertNextStepIsNotCalled();
        }