use of eu.bcvsolutions.idm.core.model.event.RoleEvent in project CzechIdMng by bcvsolutions.
the class EntityEventProcessorUnitTest method testSupportAllIdentityEvents.
@Test
public void testSupportAllIdentityEvents() {
EntityEventProcessor<?> processor = new EventProcessorIdentity();
assertTrue(processor.supports(new IdentityEvent(IdentityEventType.CREATE, new IdmIdentityDto())));
assertTrue(processor.supports(new IdentityEvent(IdentityEventType.UPDATE, new IdmIdentityDto())));
assertTrue(processor.supports(new IdentityEvent(IdentityEventType.DELETE, new IdmIdentityDto())));
assertFalse(processor.supports(new RoleEvent(RoleEventType.DELETE, new IdmRoleDto())));
assertTrue(processor.supports(new CoreEvent<IdmIdentityDto>(CustomType.SAVE, new IdmIdentityDto())));
assertTrue(processor.supports(new CoreEvent<>(CustomType.CUSTOM, new IdmIdentityDto())));
}
use of eu.bcvsolutions.idm.core.model.event.RoleEvent in project CzechIdMng by bcvsolutions.
the class EntityEventProcessorUnitTest method testSupportRoleDeleteOnly.
@Test
public void testSupportRoleDeleteOnly() {
EntityEventProcessor<?> processor = new EventProcessorRole();
assertFalse(processor.supports(new IdentityEvent(IdentityEventType.UPDATE, new IdmIdentityDto())));
assertFalse(processor.supports(new IdentityEvent(IdentityEventType.DELETE, new IdmIdentityDto())));
assertTrue(processor.supports(new RoleEvent(RoleEventType.DELETE, new IdmRoleDto())));
assertFalse(processor.supports(new CoreEvent<IdmIdentityDto>(CustomType.SAVE, new IdmIdentityDto())));
assertFalse(processor.supports(new CoreEvent<>(CustomType.CUSTOM, new IdmIdentityDto())));
assertTrue(processor.supports(new CoreEvent<IdmRoleDto>(IdentityEventType.UPDATE, new IdmRoleDto())));
}
Aggregations