public void Reader_Read_Pagination_Succeeds(string pageNumber, string pageSize, string scopeTreesExpected, string valueTreesExpected)
        {
            // Act
            if (pageNumber != null)
            {
                _reader.Read("page[number]", pageNumber);
            }

            if (pageSize != null)
            {
                _reader.Read("page[size]", pageSize);
            }

            var constraints = _reader.GetConstraints();

            // Assert
            var scopeTreesExpectedArray = scopeTreesExpected.Split("|");
            var scopeTrees = constraints.Select(x => x.Scope).ToArray();

            scopeTrees.Should().HaveSameCount(scopeTreesExpectedArray);
            scopeTrees.Select(tree => tree?.ToString() ?? "").Should().BeEquivalentTo(scopeTreesExpectedArray, options => options.WithStrictOrdering());

            var valueTreesExpectedArray = valueTreesExpected.Split("|");
            var valueTrees = constraints.Select(x => x.Expression).ToArray();

            valueTrees.Should().HaveSameCount(valueTreesExpectedArray);
            valueTrees.Select(tree => tree.ToString()).Should().BeEquivalentTo(valueTreesExpectedArray, options => options.WithStrictOrdering());
        }
        public void Reader_Read_Pagination_Succeeds(string pageNumber, string pageSize, string scopeTreesExpected, string valueTreesExpected)
        {
            // Act
            if (pageNumber != null)
            {
                _reader.Read("page[number]", pageNumber);
            }

            if (pageSize != null)
            {
                _reader.Read("page[size]", pageSize);
            }

            IReadOnlyCollection <ExpressionInScope> constraints = _reader.GetConstraints();

            // Assert
            string[] scopeTreesExpectedArray          = scopeTreesExpected.Split("|");
            ResourceFieldChainExpression[] scopeTrees = constraints.Select(expressionInScope => expressionInScope.Scope).ToArray();

            scopeTrees.Should().HaveSameCount(scopeTreesExpectedArray);
            scopeTrees.Select(tree => tree?.ToString() ?? "").Should().BeEquivalentTo(scopeTreesExpectedArray, options => options.WithStrictOrdering());

            string[]          valueTreesExpectedArray = valueTreesExpected.Split("|");
            QueryExpression[] valueTrees = constraints.Select(expressionInScope => expressionInScope.Expression).ToArray();

            valueTrees.Should().HaveSameCount(valueTreesExpectedArray);
            valueTrees.Select(tree => tree.ToString()).Should().BeEquivalentTo(valueTreesExpectedArray, options => options.WithStrictOrdering());
        }