...
Code Block |
---|
package org.openmrs.api;
**
* Tests on the methods found in MyService
*/
public class MyServiceTest extends BaseContextSensitiveTest {
**
* Check that output looks right for the short patients
*/
@Test
@Verifies(value = "should get patients given valid first name and last name", method = "findPatients(String,String)")
public void findPatients_shouldGetPatientsGivenValidFirstNameAndLastName() throws Exception {
initializeInMemoryDatabase();
executeDataSet("org/openmrs/test/api/myservice/include/patients.xml");
authenticate();
List<Patient> patients = Context.getPatientService().getPatients("John Doe", null, null, false);
Assert.assertEquals(5, patients.size().intValue();
}
...
}
|
- 3) Run your test class. In eclipse:*
...