public void Matches_ArraySlice(string expression, int?start, int?end, int step, bool?expected)
        {
            var element = new JsonPathExpressionElement(expression);
            var other   = new JsonPathArraySliceElement(start, end, step);

            bool?actual = element.Matches(other);

            actual.Should().Be(expected);
        }
        public void Matches_Expression(string expression, string otherExpression, bool expected)
        {
            var element = new JsonPathExpressionElement(expression);
            var other   = new JsonPathExpressionElement(otherExpression);

            bool?actual = element.Matches(other);

            actual.Should().Be(expected);
        }
        public void Matches_ArrayIndexList(string expression, int indexCount, bool?expected)
        {
            var element = new JsonPathExpressionElement(expression);
            var other   = new JsonPathArrayIndexListElement(Enumerable.Range(0, indexCount).ToList());

            bool?actual = element.Matches(other);

            actual.Should().Be(expected);
        }
        public void Matches_Any(JsonPathElementType type, bool?expected)
        {
            var element = new JsonPathExpressionElement("@.length-1");
            var other   = ElementCreator.CreateAny(type);

            bool?actual = element.Matches(other);

            actual.Should().Be(expected);
        }