/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#purge(java.lang.Object, * org.openmrs.module.webservices.rest.web.RequestContext) */ @Override public void purge(Condition condition, RequestContext requestContext) throws ResponseException { conditionService.purgeCondition(condition); }
/** * @see ConditionService#purgeCondition(Condition) */ @Test public void purgeCondition_shouldPurgeCondition() { Integer conditionId = 1; Condition existingCondition = conditionService.getCondition(conditionId); Assert.assertNotNull(existingCondition); conditionService.purgeCondition(conditionService.getCondition(conditionId)); Condition purgedCondition = conditionService.getCondition(conditionId); Assert.assertNull(purgedCondition); } }