Search in sources :

Example 1 with LocationDatatype

use of org.openmrs.customdatatype.datatype.LocationDatatype in project openmrs-core by openmrs.

the class DatatypeServiceTest method getHandler_shouldReturnAHandlerForADatatypeThatExtendsAGenericSuperclass.

/**
 * @see DatatypeService#getHandler(CustomDatatype,String)
 */
@Test
public void getHandler_shouldReturnAHandlerForADatatypeThatExtendsAGenericSuperclass() {
    DatatypeService service = Context.getDatatypeService();
    CustomDatatype locationDatatype = CustomDatatypeUtil.getDatatype(LocationDatatype.class.getName(), null);
    Assert.assertEquals(LocationDatatypeHandler.class, service.getHandler(locationDatatype, null).getClass());
}
Also used : CustomDatatype(org.openmrs.customdatatype.CustomDatatype) LocationDatatype(org.openmrs.customdatatype.datatype.LocationDatatype) Test(org.junit.Test) BaseContextSensitiveTest(org.openmrs.test.BaseContextSensitiveTest)

Aggregations

Test (org.junit.Test)1 CustomDatatype (org.openmrs.customdatatype.CustomDatatype)1 LocationDatatype (org.openmrs.customdatatype.datatype.LocationDatatype)1 BaseContextSensitiveTest (org.openmrs.test.BaseContextSensitiveTest)1