public void GetMedicalVendorInvoiceItemsReturnsEmptyListWhenInvalidIdGiven() { List <MedicalVendorInvoiceItem> medicalVendorInvoiceItems = _medicalVendorInvoiceItemRepository. GetMedicalVendorInvoiceItems(INVALID_MEDICAL_VENDOR_MEDICAL_VENDOR_USER_ID, new DateTime(2000, 1, 1), DateTime.Today); Assert.IsNotNull(medicalVendorInvoiceItems); Assert.IsEmpty(medicalVendorInvoiceItems); }
public PhysicianInvoice GenerateInvoice(long medicalVendorId, long physicianId, DateTime payPeriodStartDate, DateTime payPeriodEndDate) { List <MedicalVendorInvoiceItem> medicalVendorInvoiceItems = _medicalVendorInvoiceItemRepository. GetMedicalVendorInvoiceItems(physicianId, payPeriodStartDate, payPeriodEndDate); if (medicalVendorInvoiceItems.IsEmpty()) { return(null); } Physician physician = _physicianRepository.GetPhysician(physicianId); MedicalVendor medicalVendor = _medicalVendorRepository.GetMedicalVendor(medicalVendorId); return(_medicalVendorInvoiceFactory.CreateNewMedicalVendorInvoice(medicalVendor, physician, medicalVendorInvoiceItems, payPeriodStartDate, payPeriodEndDate)); }