/** * @see LocationService#purgeLocationAttributeType(LocationAttributeType) */ @Test public void purgeLocationAttributeType_shouldCompletelyRemoveALocationAttributeType() { executeDataSet(LOC_ATTRIBUTE_DATA_XML); Assert.assertEquals(2, Context.getLocationService().getAllLocationAttributeTypes().size()); Context.getLocationService().purgeLocationAttributeType(Context.getLocationService().getLocationAttributeType(2)); Assert.assertEquals(1, Context.getLocationService().getAllLocationAttributeTypes().size()); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#purge(java.lang.Object, * org.openmrs.module.webservices.rest.web.RequestContext) */ @Override public void purge(LocationAttributeType delegate, RequestContext context) throws ResponseException { service().purgeLocationAttributeType(delegate); }