public void ApplyPagingDetailsNullFetchExpressionQuery()
        {
            string cookie = string.Empty;
            int    page   = 1;
            int    count  = 10;

            var fetchExpression = new FetchExpression();

            FluentActions.Invoking(() => fetchExpression.ApplyPagingDetails(cookie, page, count))
            .Should()
            .Throw <ArgumentNullException>();
        }
        public void ApplyPagingDetailsWithNoCookie()
        {
            string cookie = null;
            int    page   = 1;
            int    count  = 10;

            var fetchExpression = new FetchExpression
            {
                Query = "<fetch><entity name=\"contact\"><attribute name=\"firstname\" /><attribute name=\"lastname\" /></entity></fetch>"
            };

            FetchExpression actual = null;

            FluentActions.Invoking(() => actual = fetchExpression.ApplyPagingDetails(cookie, page, count))
            .Should()
            .NotThrow();

            actual.Query.Should().Contain($"page=\"{page}\"");
            actual.Query.Should().Contain($"count=\"{count}\"");
            actual.Query.Should().NotContain($"paging-cookie=\"");
        }