@Test public void getDiffType() throws Exception { assertEquals(NotificationEmailDiffType.STANDARD, mocker.getComponentUnderTest().getDiffType()); DocumentReference emailClassReference = new DocumentReference("someWiki", Arrays.asList("XWiki", "Notifications", "Code"), "NotificationEmailPreferenceClass"); when(documentAccessBridge.getProperty(currentUser, emailClassReference, "diffType")) .thenReturn("NOTHING"); assertEquals(NotificationEmailDiffType.NOTHING, mocker.getComponentUnderTest().getDiffType()); DocumentReference user2 = new DocumentReference("someWiki", "XWiki", "User2"); String user2Id = "someWiki:XWiki.User2"; when(referenceResolver.resolve(user2Id)).thenReturn(user2); when(documentAccessBridge.getProperty(new DocumentReference("mainWiki", getCodeSpace(), "NotificationAdministration"), new DocumentReference("mainWiki", getCodeSpace(), "NotificationEmailPreferenceClass"), "diffType")).thenReturn("NOTHING"); assertEquals(NotificationEmailDiffType.NOTHING, mocker.getComponentUnderTest().getDiffType(user2Id)); when(documentAccessBridge.getProperty(new DocumentReference("someWiki", getCodeSpace(), "NotificationAdministration"), new DocumentReference("mainWiki", getCodeSpace(), "NotificationEmailPreferenceClass"), "diffType")).thenReturn("NOTHING"); assertEquals(NotificationEmailDiffType.NOTHING, mocker.getComponentUnderTest().getDiffType(user2Id)); }
@Override public NotificationEmailDiffType getDiffType() { return getDiffType(documentAccessBridge.getCurrentUserReference()); }
DefaultNotificationEmailUserPreferenceManager implements NotificationEmailUserPreferenceManager { @Override public NotificationEmailDiffType getDiffType() { return getDiffType(documentAccessBridge.getCurrentUserReference()); } }
DefaultNotificationEmailUserPreferenceManager implements NotificationEmailUserPreferenceManager { @Override public NotificationEmailDiffType getDiffType() { return getDiffType(documentAccessBridge.getCurrentUserReference()); }  }
DefaultNotificationEmailUserPreferenceManager implements NotificationEmailUserPreferenceManager { @Override public NotificationEmailDiffType getDiffType() { return getDiffType(documentAccessBridge.getCurrentUserReference()); }  @Override NotificationEmailDiffType getDiffType(); @Override NotificationEmailDiffType getDiffType(String userId); }
DefaultNotificationEmailUserPreferenceManager implements NotificationEmailUserPreferenceManager { @Override public NotificationEmailDiffType getDiffType() { return getDiffType(documentAccessBridge.getCurrentUserReference()); }  @Override NotificationEmailDiffType getDiffType(); @Override NotificationEmailDiffType getDiffType(String userId);  }