use of com.blackducksoftware.integration.hub.alert.channel.email.EmailGroupManager in project hub-alert by blackducksoftware.
the class EmailConfigActionsTest method createMockedConfigActionsUsingObjectTransformer.
@Override
public EmailGroupDistributionConfigActions createMockedConfigActionsUsingObjectTransformer(final ObjectTransformer objectTransformer) {
final EmailGroupManager emailManager = Mockito.mock(EmailGroupManager.class);
final EmailGroupDistributionRepositoryWrapper mockedEmailRepository = Mockito.mock(EmailGroupDistributionRepositoryWrapper.class);
final CommonDistributionRepositoryWrapper commonRepository = Mockito.mock(CommonDistributionRepositoryWrapper.class);
final ConfiguredProjectsRepositoryWrapper projectsRepository = Mockito.mock(ConfiguredProjectsRepositoryWrapper.class);
final DistributionProjectRepositoryWrapper distributionProjectRepository = Mockito.mock(DistributionProjectRepositoryWrapper.class);
final ConfiguredProjectsActions<EmailGroupDistributionRestModel> projectsAction = new ConfiguredProjectsActions<>(projectsRepository, distributionProjectRepository);
final NotificationTypeRepositoryWrapper notificationRepository = Mockito.mock(NotificationTypeRepositoryWrapper.class);
final DistributionNotificationTypeRepositoryWrapper notificationDistributionRepository = Mockito.mock(DistributionNotificationTypeRepositoryWrapper.class);
final NotificationTypesActions<EmailGroupDistributionRestModel> notificationAction = new NotificationTypesActions<>(notificationRepository, notificationDistributionRepository);
final EmailGroupDistributionConfigActions emailGroupDistributionConfigActions = new EmailGroupDistributionConfigActions(commonRepository, mockedEmailRepository, projectsAction, notificationAction, objectTransformer, emailManager);
return emailGroupDistributionConfigActions;
}
use of com.blackducksoftware.integration.hub.alert.channel.email.EmailGroupManager in project hub-alert by blackducksoftware.
the class EmailGroupDistributionConfigActionsTest method testTestConfig.
@Test
public void testTestConfig() throws Exception {
final EmailGroupManager emailManager = Mockito.mock(EmailGroupManager.class);
final EmailGroupDistributionConfigActions configActions = new EmailGroupDistributionConfigActions(null, null, null, null, null, emailManager);
configActions.testConfig(null);
verify(emailManager, times(1)).sendTestMessage(Mockito.any());
Mockito.reset(emailManager);
configActions.testConfig(null);
verify(emailManager, times(1)).sendTestMessage(Mockito.any());
}
Aggregations