|
13 | 13 | */
|
14 | 14 | package org.openmrs.web.dwr;
|
15 | 15 |
|
16 |
| -import java.util.Collection; |
17 |
| -import java.util.List; |
18 |
| -import java.util.Map; |
19 |
| - |
20 | 16 | import org.junit.Assert;
|
21 | 17 | import org.junit.Ignore;
|
22 | 18 | import org.junit.Test;
|
23 |
| -import org.openmrs.Patient; |
24 |
| -import org.openmrs.PatientIdentifier; |
25 |
| -import org.openmrs.api.PatientService; |
26 |
| -import org.openmrs.api.context.Context; |
27 | 19 | import org.openmrs.test.Verifies;
|
28 | 20 | import org.openmrs.web.test.BaseWebContextSensitiveTest;
|
29 | 21 |
|
| 22 | +import java.util.Collection; |
| 23 | +import java.util.Map; |
| 24 | + |
30 | 25 | /**
|
31 | 26 | * Test the methods in {@link DWRPatientsServiceTest}
|
32 | 27 | */
|
@@ -100,28 +95,4 @@ public void findCountAndPatients_shouldSignalForANewSearchIfTheNewSearchValueHas
|
100 | 95 | Assert.assertNotNull(resultObjects.get("notification"));
|
101 | 96 | }
|
102 | 97 |
|
103 |
| - /** |
104 |
| - * @see {@link DWRPatientService#findCountAndPatients(String,Integer,Integer,null)} |
105 |
| - */ |
106 |
| - @Test |
107 |
| - @Verifies(value = "should match patient with identifiers that contain no digit", method = "findCountAndPatients(String,Integer,Integer,null)") |
108 |
| - public void findCountAndPatients_shouldMatchPatientWithIdentifiersThatContainNoDigit() throws Exception { |
109 |
| - PatientService ps = Context.getPatientService(); |
110 |
| - final String identifier = "XYZ"; |
111 |
| - //should have no patient with this identifiers |
112 |
| - Assert.assertEquals(0, ps.getCountOfPatients(identifier).intValue()); |
113 |
| - |
114 |
| - Patient patient = ps.getPatient(2); |
115 |
| - PatientIdentifier pId = new PatientIdentifier(identifier, ps.getPatientIdentifierType(2), Context |
116 |
| - .getLocationService().getLocation(1)); |
117 |
| - patient.addIdentifier(pId); |
118 |
| - ps.savePatient(patient); |
119 |
| - |
120 |
| - //Let's do this in a case insensitive way |
121 |
| - Map<String, Object> resultObjects = new DWRPatientService().findCountAndPatients(identifier.toLowerCase(), 0, null, |
122 |
| - true); |
123 |
| - Assert.assertEquals(1, resultObjects.get("count")); |
124 |
| - Assert.assertEquals(1, ((List<?>) resultObjects.get("objectList")).size()); |
125 |
| - } |
126 |
| - |
127 | 98 | }
|
0 commit comments