use of eu.bcvsolutions.idm.core.event.TestContentTwo in project CzechIdMng by bcvsolutions.
the class DefaultEntityEventManagerIntergationTest method testConfigPropertyEventTypeOverwrite.
@Test
public void testConfigPropertyEventTypeOverwrite() {
String eventTypeName = getHelper().createName() + "_test_type";
EventType type = (EventType) () -> eventTypeName;
EntityEvent<TestContentTwo> event = new CoreEvent<>(type, new TestContentTwo());
EventContext<TestContentTwo> context = manager.process(event);
assertEquals(0, context.getResults().size());
String configPropName = testTwoEntityEventProcessorOne.getConfigurationPropertyName(EntityEventProcessor.PROPERTY_EVENT_TYPES);
getHelper().setConfigurationValue(configPropName, eventTypeName);
EntityEvent<TestContentTwo> event2 = new CoreEvent<>(type, new TestContentTwo());
EventContext<TestContentTwo> context2 = manager.process(event2);
assertEquals(2, context2.getResults().size());
}
use of eu.bcvsolutions.idm.core.event.TestContentTwo in project CzechIdMng by bcvsolutions.
the class DefaultEntityEventManagerIntergationTest method testProcessorSameOrder.
@Test
public void testProcessorSameOrder() {
Assert.assertFalse(eventConfiguration.isAsynchronous());
//
EntityEvent<TestContentTwo> event = new CoreEvent<>(CoreEventType.EAV_SAVE, new TestContentTwo());
EventContext<TestContentTwo> context = manager.process(event);
//
assertEquals(2, context.getResults().size());
assertEquals(2, context.getProcessedOrder().intValue());
}
Aggregations