use of com.blackducksoftware.integration.hub.alert.channel.hipchat.HipChatManager in project hub-alert by blackducksoftware.
the class HipChatDistributionConfigActionsTest method testTestConfig.
@Test
public void testTestConfig() throws Exception {
final HipChatManager hipChatManager = Mockito.mock(HipChatManager.class);
final HipChatDistributionConfigActions configActions = new HipChatDistributionConfigActions(null, null, null, null, null, hipChatManager);
configActions.testConfig(null);
verify(hipChatManager, times(1)).sendTestMessage(Mockito.any());
Mockito.reset(hipChatManager);
configActions.testConfig(null);
verify(hipChatManager, times(1)).sendTestMessage(Mockito.any());
}
use of com.blackducksoftware.integration.hub.alert.channel.hipchat.HipChatManager in project hub-alert by blackducksoftware.
the class GlobalHipChatConfigActionsTest method createMockedConfigActionsUsingObjectTransformer.
@Override
public GlobalHipChatConfigActions createMockedConfigActionsUsingObjectTransformer(final ObjectTransformer objectTransformer) {
final GlobalHipChatRepositoryWrapper hipChatRepo = Mockito.mock(GlobalHipChatRepositoryWrapper.class);
final HipChatManager hipChatManager = Mockito.mock(HipChatManager.class);
return new GlobalHipChatConfigActions(hipChatRepo, objectTransformer, hipChatManager);
}
use of com.blackducksoftware.integration.hub.alert.channel.hipchat.HipChatManager in project hub-alert by blackducksoftware.
the class GlobalHipChatConfigActionsTest method getMockedConfigActions.
@Override
public GlobalHipChatConfigActions getMockedConfigActions() {
final GlobalHipChatRepositoryWrapper hipChatRepo = Mockito.mock(GlobalHipChatRepositoryWrapper.class);
final ObjectTransformer objectTransformer = new ObjectTransformer();
final HipChatManager hipChatManager = Mockito.mock(HipChatManager.class);
return new GlobalHipChatConfigActions(hipChatRepo, objectTransformer, hipChatManager);
}
use of com.blackducksoftware.integration.hub.alert.channel.hipchat.HipChatManager in project hub-alert by blackducksoftware.
the class HipChatConfigActionsTest method createMockedConfigActionsUsingObjectTransformer.
@Override
public HipChatDistributionConfigActions createMockedConfigActionsUsingObjectTransformer(final ObjectTransformer objectTransformer) {
final HipChatManager hipChatManager = Mockito.mock(HipChatManager.class);
final HipChatDistributionRepositoryWrapper mockedHipChatRepository = Mockito.mock(HipChatDistributionRepositoryWrapper.class);
final CommonDistributionRepositoryWrapper commonRepository = Mockito.mock(CommonDistributionRepositoryWrapper.class);
final ConfiguredProjectsRepositoryWrapper projectsRepository = Mockito.mock(ConfiguredProjectsRepositoryWrapper.class);
final DistributionProjectRepositoryWrapper distributionProjectRepository = Mockito.mock(DistributionProjectRepositoryWrapper.class);
final ConfiguredProjectsActions<HipChatDistributionRestModel> projectsAction = new ConfiguredProjectsActions<>(projectsRepository, distributionProjectRepository);
final NotificationTypeRepositoryWrapper notificationRepository = Mockito.mock(NotificationTypeRepositoryWrapper.class);
final DistributionNotificationTypeRepositoryWrapper notificationDistributionRepository = Mockito.mock(DistributionNotificationTypeRepositoryWrapper.class);
final NotificationTypesActions<HipChatDistributionRestModel> notificationAction = new NotificationTypesActions<>(notificationRepository, notificationDistributionRepository);
final HipChatDistributionConfigActions configActions = new HipChatDistributionConfigActions(commonRepository, mockedHipChatRepository, projectsAction, notificationAction, objectTransformer, hipChatManager);
return configActions;
}
Aggregations