use of org.apache.syncope.common.lib.to.NotificationTO in project syncope by apache.
the class NotificationITCase method read.
@Test
public void read() {
NotificationTO notificationTO = notificationService.read("9e2b911c-25de-4c77-bcea-b86ed9451050");
assertNotNull(notificationTO);
}
use of org.apache.syncope.common.lib.to.NotificationTO in project syncope by apache.
the class NotificationITCase method create.
@Test
public void create() {
NotificationTO notificationTO = buildNotificationTO();
notificationTO.setRecipientsFIQL(SyncopeClient.getUserSearchConditionBuilder().inGroups("bf825fe1-7320-4a54-bd64-143b5c18ab97").query());
Response response = notificationService.create(notificationTO);
NotificationTO actual = getObject(response.getLocation(), NotificationService.class, NotificationTO.class);
assertNotNull(actual);
assertNotNull(actual.getKey());
notificationTO.setKey(actual.getKey());
assertEquals(actual, notificationTO);
}
use of org.apache.syncope.common.lib.to.NotificationTO in project syncope by apache.
the class NotificationITCase method list.
@Test
public void list() {
List<NotificationTO> notificationTOs = notificationService.list();
assertNotNull(notificationTOs);
assertFalse(notificationTOs.isEmpty());
for (NotificationTO instance : notificationTOs) {
assertNotNull(instance);
}
}
use of org.apache.syncope.common.lib.to.NotificationTO in project syncope by apache.
the class NotificationITCase method update.
@Test
public void update() {
NotificationTO notificationTO = notificationService.read("9e2b911c-25de-4c77-bcea-b86ed9451050");
notificationTO.setRecipientsFIQL(SyncopeClient.getUserSearchConditionBuilder().inGroups("bf825fe1-7320-4a54-bd64-143b5c18ab97").query());
notificationService.update(notificationTO);
NotificationTO actual = notificationService.read(notificationTO.getKey());
assertNotNull(actual);
assertEquals(actual, notificationTO);
}
use of org.apache.syncope.common.lib.to.NotificationTO in project syncope by apache.
the class NotificationITCase method issueSYNCOPE446.
@Test
public void issueSYNCOPE446() {
NotificationTO notificationTO = buildNotificationTO();
notificationTO.getStaticRecipients().add("syncope446@syncope.apache.org");
notificationTO.getAbouts().put(AnyTypeKind.GROUP.name(), SyncopeClient.getGroupSearchConditionBuilder().is("name").equalTo("citizen").query());
NotificationTO actual = null;
try {
Response response = notificationService.create(notificationTO);
actual = getObject(response.getLocation(), NotificationService.class, NotificationTO.class);
} catch (SyncopeClientException e) {
assertNotNull(e);
}
assertNotNull(actual);
assertNotNull(actual.getKey());
notificationTO.setKey(actual.getKey());
assertEquals(actual, notificationTO);
}
Aggregations