use of eu.bcvsolutions.idm.core.notification.api.dto.filter.IdmNotificationConfigurationFilter in project CzechIdMng by bcvsolutions.
the class IdmNotificationConfigurationFilterTest method testTemplateIdFilter.
@Test
public void testTemplateIdFilter() {
String text = "someText" + System.currentTimeMillis();
IdmNotificationTemplateDto templ = createTemplate("template " + System.currentTimeMillis(), "code", "testFilter");
NotificationConfigurationDto notification = createNotification(NotificationLevel.SUCCESS, CoreModuleDescriptor.MODULE_ID + ":test003", text, templ.getId());
IdmNotificationConfigurationFilter filter = new IdmNotificationConfigurationFilter();
filter.setTemplate(templ.getId());
filter.setNotificationType(text);
Page<NotificationConfigurationDto> result = idmNotificationConfService.find(filter, null);
assertEquals(1, result.getTotalElements());
assertEquals(notification.getId(), result.getContent().get(0).getId());
}
use of eu.bcvsolutions.idm.core.notification.api.dto.filter.IdmNotificationConfigurationFilter in project CzechIdMng by bcvsolutions.
the class IdmNotificationConfigurationFilterTest method testLevelFilter.
@Test
public void testLevelFilter() {
String text = "someText" + System.currentTimeMillis();
NotificationConfigurationDto notification = createNotification(NotificationLevel.ERROR, CoreModuleDescriptor.MODULE_ID + ":test002", text, null);
IdmNotificationConfigurationFilter filter = new IdmNotificationConfigurationFilter();
filter.setLevel(NotificationLevel.ERROR);
filter.setNotificationType(text);
Page<NotificationConfigurationDto> result = idmNotificationConfService.find(filter, null);
assertEquals(1, result.getTotalElements());
assertEquals(notification.getId(), result.getContent().get(0).getId());
}
use of eu.bcvsolutions.idm.core.notification.api.dto.filter.IdmNotificationConfigurationFilter in project CzechIdMng by bcvsolutions.
the class IdmNotificationConfigurationFilterTest method testNotificationTypeFilter.
@Test
public void testNotificationTypeFilter() {
String text = "someText" + System.currentTimeMillis();
NotificationConfigurationDto notification = createNotification(NotificationLevel.SUCCESS, CoreModuleDescriptor.MODULE_ID + ":test004", text, null);
IdmNotificationConfigurationFilter filter = new IdmNotificationConfigurationFilter();
filter.setNotificationType(text);
filter.setText("core:test004");
Page<NotificationConfigurationDto> result = idmNotificationConfService.find(filter, null);
assertEquals(1, result.getTotalElements());
assertEquals(notification.getId(), result.getContent().get(0).getId());
}
use of eu.bcvsolutions.idm.core.notification.api.dto.filter.IdmNotificationConfigurationFilter in project CzechIdMng by bcvsolutions.
the class IdmNotificationConfigurationFilterTest method testTopicFilter.
@Test
public void testTopicFilter() {
String text = "someText" + System.currentTimeMillis();
NotificationConfigurationDto notification = createNotification(NotificationLevel.SUCCESS, CoreModuleDescriptor.MODULE_ID + ":test001", text, null);
IdmNotificationConfigurationFilter filter = new IdmNotificationConfigurationFilter();
filter.setText("core:test001");
filter.setNotificationType(text);
Page<NotificationConfigurationDto> result = idmNotificationConfService.find(filter, null);
assertEquals(1, result.getTotalElements());
assertEquals(notification.getId(), result.getContent().get(0).getId());
}
Aggregations