public async Task Handle_Returns1Item_WhenFilterByAmountEqual31()
        {
            // Arrange
            var query = new AccountTransactionsQuery {
                AccountId = MaryAccount, Amount = 31,
            };
            var handler = new AccountTransactionsQueryHandler(Context, _mapper);

            // Act
            var result = await handler.Handle(query, CancellationToken.None);

            // Assert
            Check.That(result.Transactions.Extracting("Amount")).ContainsExactly(31);
        }
        public async Task Handle_Returns2Items_WhenFilterByCorrespondent()
        {
            // Arrange
            var query = new AccountTransactionsQuery
            {
                AccountId     = MaryAccount,
                Correspondent = JohnAccount
            };
            var handler = new AccountTransactionsQueryHandler(Context, _mapper);

            // Act
            var result = await handler.Handle(query, CancellationToken.None);

            // Assert
            Check.That(result.Transactions.Extracting("Id")).ContainsExactly(3, 4);
        }
        public async Task Handle_Returns4Items_WhenNoFiltersForJohnAccount()
        {
            // Arrange
            var query = new AccountTransactionsQuery
            {
                AccountId = JohnAccount,
                PageSize  = 5
            };
            var handler = new AccountTransactionsQueryHandler(Context, _mapper);

            // Act
            var result = await handler.Handle(query, CancellationToken.None);

            // Assert
            Check.That(result.Transactions.Extracting("Id")).ContainsExactly(1, 3, 4, 5);
        }
        public async Task Handle_Returns2Items_WhenFilterByDate()
        {
            // Arrange
            var query = new AccountTransactionsQuery {
                AccountId = MaryAccount,
                From      = new DateTime(2018, 1, 3),
                To        = new DateTime(2018, 1, 4)
            };
            var handler = new AccountTransactionsQueryHandler(Context, _mapper);

            // Act
            var result = await handler.Handle(query, CancellationToken.None);

            // Assert
            Check.That(result.Transactions.Extracting("Amount")).ContainsExactly(30, 31);
        }