Example #1
0
            public void SetupPayments(List <Payment> payments, Guid payerId, Guid receiverId, Guid?groupId)
            {
                var filter = A.Fake <PaymentDbFilter>();

                A.CallTo(() => PaymentDbFilterFactory.Create(A <PaymentFilterInfo> .That.Matches(passedInfo =>
                                                                                                 passedInfo.GroupId == groupId &&
                                                                                                 passedInfo.PayerId == payerId &&
                                                                                                 passedInfo.ReceiverId == receiverId
                                                                                                 ))).Returns(filter);

                A.CallTo(() => PaymentRepository.GetAllAsync(filter))
                .Returns(payments);
            }
Example #2
0
 public async Task <IEnumerable <Payment> > Handle(GetPaymentsQuery request, CancellationToken cancellationToken)
 {
     return(await _repository.GetAllAsync());
 }