Search in sources :

Example 1 with NotificationTask

use of com.yahoo.athenz.common.server.notification.NotificationTask in project athenz by yahoo.

the class ZMSNotificationTaskFactoryTest method testNotificationTasksOrdering.

@Test
public void testNotificationTasksOrdering() {
    DBService dbsvc = Mockito.mock(DBService.class);
    ZMSNotificationTaskFactory zmsNotificationTaskFactory = new ZMSNotificationTaskFactory(dbsvc, USER_DOMAIN_PREFIX, new NotificationToEmailConverterCommon(null));
    List<NotificationTask> notificationTasks = zmsNotificationTaskFactory.getNotificationTasks();
    assertEquals(5, notificationTasks.size());
    assertEquals(notificationTasks.get(0).getDescription(), "pending role membership approvals reminders");
    assertEquals(notificationTasks.get(1).getDescription(), "pending group membership approvals reminders");
    assertEquals(notificationTasks.get(2).getDescription(), "membership expiration reminders");
    assertEquals(notificationTasks.get(3).getDescription(), "Periodic Review Reminder");
    assertEquals(notificationTasks.get(4).getDescription(), "group membership expiration reminders");
}
Also used : DBService(com.yahoo.athenz.zms.DBService) NotificationTask(com.yahoo.athenz.common.server.notification.NotificationTask) NotificationToEmailConverterCommon(com.yahoo.athenz.common.server.notification.NotificationToEmailConverterCommon) Test(org.testng.annotations.Test)

Aggregations

NotificationTask (com.yahoo.athenz.common.server.notification.NotificationTask)1 NotificationToEmailConverterCommon (com.yahoo.athenz.common.server.notification.NotificationToEmailConverterCommon)1 DBService (com.yahoo.athenz.zms.DBService)1 Test (org.testng.annotations.Test)1