Search in sources :

Example 1 with MockDto

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

the class DefaultEntityEventManagerIntergationTest method testBaseDtoProcessing.

@Test
public void testBaseDtoProcessing() {
    MockDto mockDto = new MockDto();
    ObserveDtoProcessor.listenContent(mockDto.getId());
    CoreEvent<BaseDto> event = new CoreEvent<BaseDto>(CoreEventType.NOTIFY, mockDto);
    EventContext<BaseDto> processed = manager.process(event);
    Assert.assertNotNull(processed.getLastResult());
    Boolean observed = (Boolean) processed.getLastResult().getEvent().getProperties().get(ObserveDtoProcessor.PROPERTY_OBSERVED);
    // 
    Assert.assertNotNull(observed);
    Assert.assertTrue(observed);
}
Also used : CoreEvent(eu.bcvsolutions.idm.core.api.event.CoreEvent) BaseDto(eu.bcvsolutions.idm.core.api.dto.BaseDto) MockDto(eu.bcvsolutions.idm.core.event.domain.MockDto) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Aggregations

BaseDto (eu.bcvsolutions.idm.core.api.dto.BaseDto)1 CoreEvent (eu.bcvsolutions.idm.core.api.event.CoreEvent)1 MockDto (eu.bcvsolutions.idm.core.event.domain.MockDto)1 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)1 Test (org.junit.Test)1