Search in sources :

Example 11 with NotificationManager

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

the class JDBCSSHRecordStoreTest method testEnableNotifications.

@Test
public void testEnableNotifications() {
    PoolableDataSource mockDataSrc = Mockito.mock(PoolableDataSource.class);
    JDBCSSHRecordStore store = new JDBCSSHRecordStore(mockDataSrc);
    boolean isEnabled = store.enableNotifications(null, null, null);
    assertFalse(isEnabled);
    NotificationManager notificationManager = Mockito.mock(NotificationManager.class);
    RolesProvider rolesProvider = Mockito.mock(RolesProvider.class);
    String serverName = "testServer";
    isEnabled = store.enableNotifications(notificationManager, rolesProvider, serverName);
    // Not supported for FileCertStore even if all dependencies provided
    assertFalse(isEnabled);
}
Also used : NotificationManager(com.yahoo.athenz.common.server.notification.NotificationManager) PoolableDataSource(com.yahoo.athenz.common.server.db.PoolableDataSource) RolesProvider(com.yahoo.athenz.common.server.db.RolesProvider) Test(org.testng.annotations.Test)

Aggregations

NotificationManager (com.yahoo.athenz.common.server.notification.NotificationManager)11 Test (org.testng.annotations.Test)9 RolesProvider (com.yahoo.athenz.common.server.db.RolesProvider)8 PoolableDataSource (com.yahoo.athenz.common.server.db.PoolableDataSource)2 NotificationToEmailConverterCommon (com.yahoo.athenz.common.server.notification.NotificationToEmailConverterCommon)2 ZTSClientNotification (com.yahoo.athenz.zts.ZTSClientNotification)2 ZTSClientNotificationSenderImpl (com.yahoo.athenz.zts.notification.ZTSClientNotificationSenderImpl)2 Authority (com.yahoo.athenz.auth.Authority)1 ZMSNotificationTaskFactory (com.yahoo.athenz.zms.notification.ZMSNotificationTaskFactory)1 ZTSNotificationTaskFactory (com.yahoo.athenz.zts.notification.ZTSNotificationTaskFactory)1 File (java.io.File)1