コード例 #1
0
        public MedicalVendorPayment GetMedicalVendorPayment(int medicalVendorPaymentId)
        {
            var physicianPaymentEntity = new PhysicianPaymentEntity(medicalVendorPaymentId);

            using (var myAdapter = PersistenceLayer.GetDataAccessAdapter())
            {
                if (!myAdapter.FetchEntity(physicianPaymentEntity))
                {
                    throw new ObjectNotFoundInPersistenceException <MedicalVendorPayment>
                              (medicalVendorPaymentId);
                }
            }
            var paymentInstruments = _paymentInstrumentRepository.
                                     GetPaymentInstrumentsForPayment(medicalVendorPaymentId);
            MedicalVendorPayment medicalVendorPayment = _mapper.Map(physicianPaymentEntity);

            medicalVendorPayment.PaymentInstruments = paymentInstruments;
            return(medicalVendorPayment);
        }
コード例 #2
0
 private void ExpectGetPaymentInstrumentsForMedicalVendorPayment(int medicalVendorPaymentId)
 {
     Expect.Call(_paymentInstrumentRepository.GetPaymentInstrumentsForPayment
                     (medicalVendorPaymentId)).Return(new List <PaymentInstrument>());
 }