Description
Extract tests that do not need an ApplicationContext and DB into a unit test class RadiologyReportServiceTest (which extends BaseContextMockTest). This will speed up our builds and make it easy to separate unit from integration tests later.
You can see an example of how the service dependencies are mocked and injected at
- createRadiologyReport
- throw illegal argument exception if given null
- throw api exception if given radiology order is not completed
- throw api exception if given order has a claimed radiology report
- throw api exception if given order has a completed radiology report
- saveRadiologyReportDraft
- throw illegal argument exception if given null
- throw illegal argument exception if given radiology report with reportId null
- throw api exception if radiology report is completed
- throw api exception if radiology report is voided
- throw api exception if given radiology reports order has a completed radiology report
- voidRadiologyReport
- throw illegal argument exception if given radiology report is null
- throw illegal argument exception if given radiology report with reportId null
- throw illegal argument exception if given void reason is null or contains only whitespaces
- throw api exception if radiology report is completed
- saveRadiologyReport
- throw illegal argument exception if given radiology report is null
- throw illegal argument exception if given radiology report with reportId null
- throw illegal argument exception if given radiology report with status null
- throw api exception if radiology report is completed
- throw api exception if radiology report is voided
- throw api exception if radiology report is not valid
- getRadiologyReport
- throw illegal argument exception if given null
- getRadiologyReportByUuid
- throw illegal argument exception if given null
- hasRadiologyOrderClaimedRadiologyReport
- throw illegal argument exception if given null
- hasRadiologyOrderCompletedRadiologyReport
- throw illegal argument exception if given null
- getActiveRadiologyReportByRadiologyOrder
- throw illegal argument exception if given null
- getRadiologyReports
- throw illegal argument exception if given null
Gliffy Diagrams
Attachments
Issue Links
- is related to
-
RAD-381 Create RadiologyOrderServiceTest
-
- Approved
-