Search in sources :

Example 1 with HipChatManager

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());
}
Also used : HipChatManager(com.blackducksoftware.integration.hub.alert.channel.hipchat.HipChatManager) Test(org.junit.Test)

Example 2 with HipChatManager

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);
}
Also used : GlobalHipChatRepositoryWrapper(com.blackducksoftware.integration.hub.alert.channel.hipchat.repository.global.GlobalHipChatRepositoryWrapper) HipChatManager(com.blackducksoftware.integration.hub.alert.channel.hipchat.HipChatManager)

Example 3 with 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);
}
Also used : GlobalHipChatRepositoryWrapper(com.blackducksoftware.integration.hub.alert.channel.hipchat.repository.global.GlobalHipChatRepositoryWrapper) ObjectTransformer(com.blackducksoftware.integration.hub.alert.web.ObjectTransformer) HipChatManager(com.blackducksoftware.integration.hub.alert.channel.hipchat.HipChatManager)

Example 4 with 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;
}
Also used : NotificationTypeRepositoryWrapper(com.blackducksoftware.integration.hub.alert.datasource.entity.repository.NotificationTypeRepositoryWrapper) DistributionNotificationTypeRepositoryWrapper(com.blackducksoftware.integration.hub.alert.datasource.relation.repository.DistributionNotificationTypeRepositoryWrapper) HipChatDistributionRepositoryWrapper(com.blackducksoftware.integration.hub.alert.channel.hipchat.repository.distribution.HipChatDistributionRepositoryWrapper) NotificationTypesActions(com.blackducksoftware.integration.hub.alert.web.actions.NotificationTypesActions) ConfiguredProjectsRepositoryWrapper(com.blackducksoftware.integration.hub.alert.datasource.entity.repository.ConfiguredProjectsRepositoryWrapper) DistributionNotificationTypeRepositoryWrapper(com.blackducksoftware.integration.hub.alert.datasource.relation.repository.DistributionNotificationTypeRepositoryWrapper) ConfiguredProjectsActions(com.blackducksoftware.integration.hub.alert.web.actions.ConfiguredProjectsActions) CommonDistributionRepositoryWrapper(com.blackducksoftware.integration.hub.alert.datasource.entity.repository.CommonDistributionRepositoryWrapper) DistributionProjectRepositoryWrapper(com.blackducksoftware.integration.hub.alert.datasource.relation.repository.DistributionProjectRepositoryWrapper) HipChatManager(com.blackducksoftware.integration.hub.alert.channel.hipchat.HipChatManager)

Aggregations

HipChatManager (com.blackducksoftware.integration.hub.alert.channel.hipchat.HipChatManager)4 GlobalHipChatRepositoryWrapper (com.blackducksoftware.integration.hub.alert.channel.hipchat.repository.global.GlobalHipChatRepositoryWrapper)2 HipChatDistributionRepositoryWrapper (com.blackducksoftware.integration.hub.alert.channel.hipchat.repository.distribution.HipChatDistributionRepositoryWrapper)1 CommonDistributionRepositoryWrapper (com.blackducksoftware.integration.hub.alert.datasource.entity.repository.CommonDistributionRepositoryWrapper)1 ConfiguredProjectsRepositoryWrapper (com.blackducksoftware.integration.hub.alert.datasource.entity.repository.ConfiguredProjectsRepositoryWrapper)1 NotificationTypeRepositoryWrapper (com.blackducksoftware.integration.hub.alert.datasource.entity.repository.NotificationTypeRepositoryWrapper)1 DistributionNotificationTypeRepositoryWrapper (com.blackducksoftware.integration.hub.alert.datasource.relation.repository.DistributionNotificationTypeRepositoryWrapper)1 DistributionProjectRepositoryWrapper (com.blackducksoftware.integration.hub.alert.datasource.relation.repository.DistributionProjectRepositoryWrapper)1 ObjectTransformer (com.blackducksoftware.integration.hub.alert.web.ObjectTransformer)1 ConfiguredProjectsActions (com.blackducksoftware.integration.hub.alert.web.actions.ConfiguredProjectsActions)1 NotificationTypesActions (com.blackducksoftware.integration.hub.alert.web.actions.NotificationTypesActions)1 Test (org.junit.Test)1