Esempio n. 1
0
        public void ChangeMedicalVendorInvoiceApprovalStatusThrowsExceptionWhenGivenStatusIsInvalid()
        {
            const ApprovalStatus invalidApprovalStatus = 0;

            _mocks.ReplayAll();
            _medicalVendorInvoiceRepository.ChangeMedicalVendorInvoiceApprovalStatus(1, invalidApprovalStatus);
            _mocks.VerifyAll();
        }
        public void ChangeMedicalVendorInvoiceApprovalStatusChangesStatusOfValidId()
        {
            PhysicianInvoice medicalVendorInvoice = _repository.
                                                    GetMedicalVendorInvoice(VALID_MEDICAL_VENDOR_INVOICE_ID);
            ApprovalStatus newStatus = medicalVendorInvoice.ApprovalStatus == ApprovalStatus.Approved ?
                                       ApprovalStatus.Unapproved : ApprovalStatus.Approved;

            _repository.ChangeMedicalVendorInvoiceApprovalStatus(VALID_MEDICAL_VENDOR_INVOICE_ID, newStatus);
            medicalVendorInvoice = _repository.GetMedicalVendorInvoice(VALID_MEDICAL_VENDOR_INVOICE_ID);

            Assert.AreEqual(newStatus, medicalVendorInvoice.ApprovalStatus);
        }
        public bool ChangeInvoiceApprovalStatus(long invoiceId, int approvalStatus)
        {
            _medicalVendorInvoiceRepository.ChangeMedicalVendorInvoiceApprovalStatus(invoiceId, (ApprovalStatus)approvalStatus);

            return(true);
        }