public async Task ForUserAsyncShouldReturnAllReceiptsForGivenUser()
        {
            var db = DbInfrastructure.GetDatabase();
            var receiptService = new ReceiptService(db);

            const string FirstUsername = "******";

            var firstUser = new User
            {
                UserName = FirstUsername
            };

            var secondUser = new User
            {
                UserName = "******"
            };

            await db.AddRangeAsync(firstUser, secondUser);
            await db.SaveChangesAsync();

            for (var i = 0; i < 3; i++)
            {
                var receipt = new Receipt
                {
                    Fee = (i + 1) * 10,
                    PackageId = i + 1,
                    RecipientId = firstUser.Id
                };

                await db.AddAsync(receipt);
            }

            for (var i = 0; i < 10; i++)
            {
                var receipt = new Receipt
                {
                    Fee = (i + 1) * 10,
                    PackageId = i + 1,
                    RecipientId = secondUser.Id
                };

                await db.AddAsync(receipt);
            }

            await db.SaveChangesAsync();

            var receipts = await receiptService.ForUserAsync(firstUser);

            receipts.Should().HaveCount(3);

            receipts.Should()
                .Match(r => r.ElementAt(0).Fee == 10).And.Match(r => r.ElementAt(0).RecipientName == FirstUsername)
                .And
                .Match(r => r.ElementAt(1).Fee == 20).And.Match(r => r.ElementAt(1).RecipientName == FirstUsername)
                .And
                .Match(r => r.ElementAt(2).Fee == 30).And.Match(r => r.ElementAt(2).RecipientName == FirstUsername);
        }
        public void ForUserAsyncShouldThrowInvalidOperationExceptionIfUserIsNull()
        {
            var db = DbInfrastructure.GetDatabase();
            var receiptService = new ReceiptService(db);

            Func<Task> func = async () => await receiptService.ForUserAsync(null);

            func.Should().Throw<InvalidOperationException>();
        }