예제 #1
0
        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();
 }
예제 #3
0
 private void ExpectGetPaymentInstrumentsFromCheckEntities()
 {
     Expect.Call(_paymentInstrumentFactory.CreatePaymentInstruments(null)).IgnoreArguments()
     .Callback(new GetPaymentInstrumentsFromCheckEntitiesDelegate(GetPaymentInstrumentsFromCheckEntities))
     .Return(new List <PaymentInstrument>());
 }