diff --git a/omod-1.10/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_10/OrderController1_10Test.java b/omod-1.10/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_10/OrderController1_10Test.java index c7a90f70e..547a832b5 100644 --- a/omod-1.10/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_10/OrderController1_10Test.java +++ b/omod-1.10/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_10/OrderController1_10Test.java @@ -592,7 +592,7 @@ public void invalidCareCenterShouldThrowException() throws Exception { } @Test(expected = InvalidSearchException.class) - public void doSearch_shouldThrowExceptionIfNoPatientUuidIsSpecified() throws Exception { + public void doSearch_shouldReturnExceptionNotNullSetIfNoPatientUuidIsSpecified() throws Exception { MockHttpServletRequest req = newGetRequest(getURI(), new Parameter("status", "active") ); @@ -607,12 +607,10 @@ public void shouldGetOrdersByPatientUuid() throws Exception { // get all drug orders List activeDrugOrders = orderService.getActiveOrders(patient, orderService.getOrderTypeByName("Drug order"), null, null); - int activeDrugOrderCount = activeDrugOrders.size(); // get all test orders List activeTestOrders = orderService.getActiveOrders(patient, orderService.getOrderTypeByName("Test order"), null, null); - int activeTestOrderCount = activeTestOrders.size(); // order service should return all active orders with patientUuid specified MockHttpServletRequest req = newGetRequest(getURI(), @@ -621,7 +619,7 @@ public void shouldGetOrdersByPatientUuid() throws Exception { ); SimpleObject orders = deserialize(handle(req)); ArrayList resp = (ArrayList) PropertyUtils.getProperty(orders, "results"); - assertEquals(activeTestOrderCount + activeDrugOrderCount, resp.size()); + assertEquals(activeTestOrders.size() + activeDrugOrders.size(), resp.size()); } }