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); }
private void ExpectGetPaymentInstrumentsForMedicalVendorPayment(int medicalVendorPaymentId) { Expect.Call(_paymentInstrumentRepository.GetPaymentInstrumentsForPayment (medicalVendorPaymentId)).Return(new List <PaymentInstrument>()); }