use of org.openmrs.comparator.PatientIdentifierTypeDefaultComparator in project openmrs-core by openmrs.
the class PatientServiceTest method getPatientIdentifierTypes_shouldOrderAsDefaultComparator.
/**
* @see PatientService#getPatientIdentifierTypes(String,String,Boolean,Boolean)
*/
@Test
public void getPatientIdentifierTypes_shouldOrderAsDefaultComparator() throws Exception {
List<PatientIdentifierType> list = patientService.getPatientIdentifierTypes(null, null, false, null);
List<PatientIdentifierType> sortedList = new ArrayList<>(list);
sortedList.sort(new PatientIdentifierTypeDefaultComparator());
Assert.assertEquals(sortedList, list);
}
use of org.openmrs.comparator.PatientIdentifierTypeDefaultComparator in project openmrs-core by openmrs.
the class PatientServiceTest method getAllPatientIdentifierTypes_shouldOrderAsDefaultComparator.
/**
* @see PatientService#getAllPatientIdentifierTypes(boolean)
*/
@Test
public void getAllPatientIdentifierTypes_shouldOrderAsDefaultComparator() throws Exception {
List<PatientIdentifierType> list = patientService.getAllPatientIdentifierTypes();
List<PatientIdentifierType> sortedList = new ArrayList<>(list);
sortedList.sort(new PatientIdentifierTypeDefaultComparator());
Assert.assertEquals(sortedList, list);
}
Aggregations