Skip to content
Snippets Groups Projects
Unverified Commit 68972be6 authored by Clément Aubin's avatar Clément Aubin
Browse files

XWIKI-14564: Filter to hide system changes on documents, activated by

default
* Fix unit tests in xwiki-platform-notifications-sources
parent 7032d424
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,7 @@
import org.junit.Rule;
import org.junit.Test;
import org.mockito.ArgumentMatchers;
import org.mockito.internal.util.collections.Sets;
import org.xwiki.configuration.ConfigurationSource;
import org.xwiki.model.reference.DocumentReference;
import org.xwiki.model.reference.EntityReferenceSerializer;
......@@ -268,7 +269,7 @@ public void generateQueryWithFilters() throws Exception
NotificationFilter notificationFilter1 = mock(NotificationFilter.class);
NotificationFilter notificationFilter2 = mock(NotificationFilter.class);
when(notificationFilterManager.getFilters(any(DocumentReference.class),
any(NotificationPreference.class))).thenReturn(Arrays.asList(notificationFilter1, notificationFilter2));
any(NotificationPreference.class))).thenReturn(Sets.newSet(notificationFilter1, notificationFilter2));
when(notificationFilter1.filterExpression(any(DocumentReference.class), any(NotificationPreference.class)))
.thenReturn(
......@@ -345,7 +346,7 @@ public void generateQueryWithNoRelevantFilters() throws Exception
// Mocks
NotificationFilter notificationFilter1 = mock(NotificationFilter.class);
when(notificationFilterManager.getFilters(any(DocumentReference.class),
any(NotificationPreference.class))).thenReturn(Arrays.asList(notificationFilter1));
any(NotificationPreference.class))).thenReturn(Collections.singleton(notificationFilter1));
when(notificationFilter1.filterExpression(any(DocumentReference.class), any(NotificationPreference.class)))
.thenReturn(new EmptyNode());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment