Search in sources :

Example 1 with ConditionalContent

use of eu.bcvsolutions.idm.core.event.ConditionalContent in project CzechIdMng by bcvsolutions.

the class DefaultEntityEventManagerIntergationTest method testConditionalProcessor.

@Test
public void testConditionalProcessor() {
    EntityEvent<ConditionalContent> event = new CoreEvent<>(CoreEventType.CREATE, new ConditionalContent(false));
    EventContext<ConditionalContent> context = entityEventManager.process(event);
    // 
    assertEquals(0, context.getResults().size());
    // 
    event = new CoreEvent<>(CoreEventType.CREATE, new ConditionalContent(true));
    context = entityEventManager.process(event);
    // 
    assertEquals(1, context.getResults().size());
}
Also used : ConditionalContent(eu.bcvsolutions.idm.core.event.ConditionalContent) CoreEvent(eu.bcvsolutions.idm.core.api.event.CoreEvent) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Aggregations

CoreEvent (eu.bcvsolutions.idm.core.api.event.CoreEvent)1 ConditionalContent (eu.bcvsolutions.idm.core.event.ConditionalContent)1 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)1 Test (org.junit.Test)1