public List <PaymentInstrument> GetPaymentInstrumentsForPayment(long medicalVendorPaymentId) { var checkEntities = new EntityCollection <CheckEntity>(); var bucket = new RelationPredicateBucket(); bucket.Relations.Add(CheckEntity.Relations.MVPaymentCheckDetailsEntityUsingCheckId); bucket.Relations.Add(MVPaymentCheckDetailsEntity.Relations.PhysicianPaymentEntityUsingMvpaymentId); bucket.PredicateExpression.Add(PhysicianPaymentFields.PhysicianPaymentId == medicalVendorPaymentId); using (var myAdapter = PersistenceLayer.GetDataAccessAdapter()) { myAdapter.FetchEntityCollection(checkEntities, bucket); } return(_paymentInstrumentFactory.CreatePaymentInstruments(checkEntities)); }
public void CreatePaymentInstrumentsThrowsExceptionWhenNullCollectionGiven() { _mocks.ReplayAll(); _paymentInstrumentFactory.CreatePaymentInstruments(null); _mocks.VerifyAll(); }
private void ExpectGetPaymentInstrumentsFromCheckEntities() { Expect.Call(_paymentInstrumentFactory.CreatePaymentInstruments(null)).IgnoreArguments() .Callback(new GetPaymentInstrumentsFromCheckEntitiesDelegate(GetPaymentInstrumentsFromCheckEntities)) .Return(new List <PaymentInstrument>()); }