Search in sources :

Example 1 with SaveOrUpdateEvent

use of org.hibernate.event.spi.SaveOrUpdateEvent in project BridgeServer2 by Sage-Bionetworks.

the class TagEventListenerTest method onSaveOrUpdateNotTag.

@Test
public void onSaveOrUpdateNotTag() throws HibernateException {
    SaveOrUpdateEvent event = new SaveOrUpdateEvent(new HibernateAssessment(), null);
    listener.onSaveOrUpdate(event);
    verify(cacheProvider, never()).removeObject(CacheKey.tagList());
}
Also used : SaveOrUpdateEvent(org.hibernate.event.spi.SaveOrUpdateEvent) HibernateAssessment(org.sagebionetworks.bridge.models.assessments.HibernateAssessment) Test(org.testng.annotations.Test)

Example 2 with SaveOrUpdateEvent

use of org.hibernate.event.spi.SaveOrUpdateEvent in project BridgeServer2 by Sage-Bionetworks.

the class TagEventListenerTest method onSaveOrUpdate.

@Test
public void onSaveOrUpdate() throws HibernateException {
    SaveOrUpdateEvent event = new SaveOrUpdateEvent(new Tag("value"), null);
    listener.onSaveOrUpdate(event);
    verify(cacheProvider).removeObject(CacheKey.tagList());
}
Also used : SaveOrUpdateEvent(org.hibernate.event.spi.SaveOrUpdateEvent) Tag(org.sagebionetworks.bridge.models.Tag) Test(org.testng.annotations.Test)

Aggregations

SaveOrUpdateEvent (org.hibernate.event.spi.SaveOrUpdateEvent)2 Test (org.testng.annotations.Test)2 Tag (org.sagebionetworks.bridge.models.Tag)1 HibernateAssessment (org.sagebionetworks.bridge.models.assessments.HibernateAssessment)1