Uploaded image for project: 'Radiology Module'
  1. Radiology Module
  2. RAD-381

Create RadiologyOrderServiceTest

    XMLWordPrintable

    Details

    • Complexity:
      High

      Description

      Extract tests that do not need an ApplicationContext and DB into a unit test class RadiologyOrderServiceTest (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

      https://github.com/openmrs/openmrs-module-radiology/blob/master/omod/src/test/java/org/openmrs/module/radiology/order/web/RadiologyOrderFormControllerTest.java#L62-L84

      • placeRadiologyOrder
        • throw illegal argument exception given null
        • throw illegal argument exception if given radiology order has no study
        • throw api exception on saving an existing radiology order
      • discontinueRadiologyOrder
        • throw illegal argument exception if given radiology order is null
        • throw illegal argument exception if given radiology order with orderId null
        • throw illegal argument exception if given orderer is null
        • throw api exception if given radiology order is discontinued
        • throw api exception if given radiology order is in progress
        • throw api exception if given radiology order is completed
      • getRadiologyOrder
        • throw illegal argument exception if given null
      • getRadiologyOrderByUuid
        • throw illegal argument exception if given null
      • getRadiologyOrders
        • throw illegal argument exception if given null

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              teleivo Ivo Ulrich
              Reporter:
              teleivo Ivo Ulrich
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: