Exemple #1
0
        public void GetMedicalVendorInvoiceThrowsExceptionWhenGivenInvalidId()
        {
            const long invalidInvoiceId = 0;

            ExpectGetDataAccessAdapterAndDispose();
            ExpectFetchEntity(false);

            _mocks.ReplayAll();
            _medicalVendorInvoiceRepository.GetMedicalVendorInvoice(invalidInvoiceId);
            _mocks.VerifyAll();
        }
        public List <MedicalVendorPaymentPodViewData> GetPodViewDataForInvoice(long medicalVendorInvoiceId)
        {
            List <MedicalVendorInvoiceItem> medicalVendorInvoiceItems = _medicalVendorInvoiceRepository.
                                                                        GetMedicalVendorInvoice(medicalVendorInvoiceId).MedicalVendorInvoiceItems;

            return(_podViewDataFactory.CreatePodViewData(medicalVendorInvoiceItems));
        }
        public void GetMedicalVendorInvoiceReturnsInvoiceWhenValidIdGiven()
        {
            PhysicianInvoice medicalVendorInvoice = _repository.
                                                    GetMedicalVendorInvoice(VALID_MEDICAL_VENDOR_INVOICE_ID);

            Assert.IsNotNull(medicalVendorInvoice);
            Assert.AreEqual(VALID_MEDICAL_VENDOR_INVOICE_ID, medicalVendorInvoice.Id);
        }
        public PhysicianInvoice GetInvoice(long invoiceId)
        {
            try
            {
                PhysicianInvoice medicalVendorInvoice =
                    _medicalVendorInvoiceRepository.GetMedicalVendorInvoice(invoiceId);

                medicalVendorInvoice.MedicalVendorInvoiceItems = medicalVendorInvoice.
                                                                 MedicalVendorInvoiceItems.OrderBy(mvii => mvii.ReviewDate).ThenBy(mvii => mvii.EventName).ToList();
                return(medicalVendorInvoice);
            }
            catch (Exception)
            {
                //TODO:log the exception in log4net
                return(null);
            }
        }
 public PhysicianInvoice GetMedicalVendorInvoice(long medicalVendorInvoiceId)
 {
     return(_medicalVendorInvoiceRepository.GetMedicalVendorInvoice(medicalVendorInvoiceId));
 }