use of org.xwiki.notifications.preferences.NotificationPreference in project xwiki-platform by xwiki.
the class ScopeNotificationFilterTest method matchPreferenceWithIncorrectPreference.
@Test
public void matchPreferenceWithIncorrectPreference() throws Exception {
NotificationPreference preference = mock(NotificationPreference.class);
when(preference.getCategory()).thenReturn(NotificationPreferenceCategory.SYSTEM);
assertFalse(mocker.getComponentUnderTest().matchesPreference(preference));
}
use of org.xwiki.notifications.preferences.NotificationPreference in project xwiki-platform by xwiki.
the class EventUserFilterTest method generateFilterExpressionWithPreferences.
@Test
public void generateFilterExpressionWithPreferences() throws Exception {
// Preferences
mockPreferences();
NotificationPreference notificationPreference = mock(NotificationPreference.class);
when(notificationPreference.getFormat()).thenReturn(NotificationFormat.ALERT);
// Test
assertNull(mocker.getComponentUnderTest().filterExpression(CURRENT_USER, notificationPreference));
}
Aggregations