use of org.openmrs.scheduler.tasks.AbstractTask in project openmrs-core by openmrs.
the class AuditableInterceptorTest method onFlushDirty_shouldNotFailWhenTheDaemonUserModifiesSomething.
/**
* @see AuditableInterceptor#onFlushDirty(Object,Serializable,null,null,null,null)
*/
@Test
public void onFlushDirty_shouldNotFailWhenTheDaemonUserModifiesSomething() throws Throwable {
new AsDaemonTask(new AbstractTask() {
@Override
public void execute() {
ConceptNumeric weight = Context.getConceptService().getConceptNumeric(5089);
Date dateChangedBefore = weight.getDateChanged();
weight.setHiAbsolute(75d);
Context.getConceptService().saveConcept(weight);
Assert.assertNotSame(dateChangedBefore, weight.getDateChanged());
}
}).runTheTask();
}
Aggregations