public async Task ShouldIgnoreThePageIfItsExplicitlyStatedAsync()
        {
            // Arrange
            var pageCallbacks = new List <int>();
            var mockClient    = new Mock <IEdubaseClient>();
            var sut           = new EstablishmentClient(mockClient.Object);

            mockClient.Setup(x => x.FindEstablishmentsAsync(It.IsAny <FindEstablishmentsRequest>())).Returns(GetReponse(2))
            .Callback <FindEstablishmentsRequest>(x => pageCallbacks.Add(x.Filter.Page));

            // Act
            await sut.FindEstablishmentsAsync(new EstablishmentFilter { Page = 1 });

            // Assert
            mockClient.Verify(x => x.FindEstablishmentsAsync(It.IsAny <FindEstablishmentsRequest>()), Times.Exactly(2));
            CollectionAssert.Contains(pageCallbacks, 0);
            CollectionAssert.Contains(pageCallbacks, 1);
        }
        public void ShouldRequestMultiplePagesAsyncIfThePageCountIsGreaterThanOne()
        {
            // Arrange
            var pageCallbacks = new List <int>();
            var mockClient    = new Mock <IEdubaseClient>();
            var sut           = new EstablishmentClient(mockClient.Object);

            mockClient.Setup(x => x.FindEstablishmentsAsync(It.IsAny <FindEstablishmentsRequest>())).Returns(GetReponse(2))
            .Callback <FindEstablishmentsRequest>(x => pageCallbacks.Add(x.Filter.Page));

            // Act
            var task = sut.FindEstablishmentsAsync();

            Task.WaitAll(task);

            // Assert
            mockClient.Verify(x => x.FindEstablishmentsAsync(It.IsAny <FindEstablishmentsRequest>()), Times.Exactly(2));
            CollectionAssert.Contains(pageCallbacks, 0);
            CollectionAssert.Contains(pageCallbacks, 1);
        }