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); }
public async Task <IEnumerable <Payment> > Handle(GetPaymentsQuery request, CancellationToken cancellationToken) { return(await _repository.GetAllAsync()); }