use of org.apache.syncope.core.persistence.api.entity.Notification in project syncope by apache.
the class NotificationTest method issueSYNCOPE445.
@Test
public void issueSYNCOPE445() {
Notification notification = entityFactory.newEntity(Notification.class);
notification.getEvents().add("save");
AnyAbout about = entityFactory.newEntity(AnyAbout.class);
about.setNotification(notification);
notification.add(about);
about.setAnyType(anyTypeDAO.findUser());
about.set("fake search condition");
notification.setRecipientsFIQL("fake search condition");
notification.setRecipientAttrName("email");
notification.getStaticRecipients().add("syncope445@syncope.apache.org");
notification.setSender("syncope@syncope.apache.org");
notification.setSubject("Test notification");
notification.setTemplate(mailTemplateDAO.find("test"));
Notification actual = notificationDAO.save(notification);
assertNotNull(actual);
assertNotNull(actual.getKey());
assertNotNull(actual.getStaticRecipients());
assertFalse(actual.getStaticRecipients().isEmpty());
}
Aggregations