Search in sources :

Example 1 with DefaultTargetableNotificationPreferenceBuilder

use of org.xwiki.notifications.preferences.internal.DefaultTargetableNotificationPreferenceBuilder in project xwiki-platform by xwiki.

the class NotificationPreferenceScriptServiceTest method setUp.

@Before
public void setUp() throws Exception {
    notificationPreferenceManager = mocker.getInstance(NotificationPreferenceManager.class);
    documentAccessBridge = mocker.getInstance(DocumentAccessBridge.class);
    authorizationManager = mocker.getInstance(ContextualAuthorizationManager.class);
    targetableNotificationPreferenceBuilderProvider = mock(Provider.class);
    when(targetableNotificationPreferenceBuilderProvider.get()).thenReturn(new DefaultTargetableNotificationPreferenceBuilder());
    mocker.registerComponent(new DefaultParameterizedType(null, Provider.class, TargetableNotificationPreferenceBuilder.class), targetableNotificationPreferenceBuilderProvider);
}
Also used : ContextualAuthorizationManager(org.xwiki.security.authorization.ContextualAuthorizationManager) NotificationPreferenceManager(org.xwiki.notifications.preferences.NotificationPreferenceManager) DefaultTargetableNotificationPreferenceBuilder(org.xwiki.notifications.preferences.internal.DefaultTargetableNotificationPreferenceBuilder) DefaultTargetableNotificationPreferenceBuilder(org.xwiki.notifications.preferences.internal.DefaultTargetableNotificationPreferenceBuilder) TargetableNotificationPreferenceBuilder(org.xwiki.notifications.preferences.TargetableNotificationPreferenceBuilder) DocumentAccessBridge(org.xwiki.bridge.DocumentAccessBridge) DefaultParameterizedType(org.xwiki.component.util.DefaultParameterizedType) Provider(javax.inject.Provider) Before(org.junit.Before)

Aggregations

Provider (javax.inject.Provider)1 Before (org.junit.Before)1 DocumentAccessBridge (org.xwiki.bridge.DocumentAccessBridge)1 DefaultParameterizedType (org.xwiki.component.util.DefaultParameterizedType)1 NotificationPreferenceManager (org.xwiki.notifications.preferences.NotificationPreferenceManager)1 TargetableNotificationPreferenceBuilder (org.xwiki.notifications.preferences.TargetableNotificationPreferenceBuilder)1 DefaultTargetableNotificationPreferenceBuilder (org.xwiki.notifications.preferences.internal.DefaultTargetableNotificationPreferenceBuilder)1 ContextualAuthorizationManager (org.xwiki.security.authorization.ContextualAuthorizationManager)1