Ejemplo n.º 1
0
        public void ChangeMedicalVendorInvoicePaymentStatusThrowsExceptionWhenGivenApprovalStatusIsInvalid()
        {
            const PaymentStatus invalidPaymentStatus = 0;

            _mocks.ReplayAll();
            _medicalVendorInvoiceRepository.ChangeMedicalVendorInvoicePaymentStatus(1, invalidPaymentStatus, DateTime.Now);
            _mocks.VerifyAll();
        }
        public void ChangeMedicalVendorInvoicePaymentStatusChangesStatusOfValidId()
        {
            PhysicianInvoice medicalVendorInvoice = _repository.
                                                    GetMedicalVendorInvoice(VALID_MEDICAL_VENDOR_INVOICE_ID);
            PaymentStatus newStatus = medicalVendorInvoice.PaymentStatus == PaymentStatus.Paid ?
                                      PaymentStatus.Unpaid : PaymentStatus.Paid;

            _repository.ChangeMedicalVendorInvoicePaymentStatus(VALID_MEDICAL_VENDOR_INVOICE_ID, newStatus, DateTime.Now);
            medicalVendorInvoice = _repository.GetMedicalVendorInvoice(VALID_MEDICAL_VENDOR_INVOICE_ID);

            Assert.AreEqual(newStatus, medicalVendorInvoice.PaymentStatus);
        }