@Test public void testGetImportedCalendar() { String importedCalendarName = "importedCalendarName"; when(calendarServiceImpl.importCalendarManager.getImportedCalendarID(testIdentity, importedCalendarName)).thenReturn("testID"); OlatCalendar olatCalendar = calendarServiceImpl.getImportedCalendar(testIdentity, importedCalendarName); verify(calendarManagerMock).getCalendar(eq(CalendarDao.TYPE_USER), anyString()); }
@Override public OlatCalendar getImportedCalendar(final Identity identity, final String calendarName) { return calendarDao.getCalendar(CalendarDao.TYPE_USER, importCalendarManager.getImportedCalendarID(identity, calendarName)); }
CalendarServiceImpl implements CalendarService, UserDataDeletable { @Override public OlatCalendar getImportedCalendar(final Identity identity, final String calendarName) { return calendarDao.getCalendar(CalendarDao.TYPE_USER, importCalendarManager.getImportedCalendarID(identity, calendarName)); } }
CalendarServiceImpl implements CalendarService, UserDataDeletable { @Override public OlatCalendar getImportedCalendar(final Identity identity, final String calendarName) { return calendarDao.getCalendar(CalendarDao.TYPE_USER, importCalendarManager.getImportedCalendarID(identity, calendarName)); } private  CalendarServiceImpl();   CalendarServiceImpl(CalendarDao calendarDao, CoordinatorManager coordinatorManager); }
CalendarServiceImpl implements CalendarService, UserDataDeletable { @Override public OlatCalendar getImportedCalendar(final Identity identity, final String calendarName) { return calendarDao.getCalendar(CalendarDao.TYPE_USER, importCalendarManager.getImportedCalendarID(identity, calendarName)); } private  CalendarServiceImpl();   CalendarServiceImpl(CalendarDao calendarDao, CoordinatorManager coordinatorManager); @Override CalendarConfig findCalendarConfigForIdentity(final OlatCalendar calendar, final Preferences userGuiPreferences); @Override void saveCalendarConfigForIdentity(final CalendarConfig config, final OlatCalendar calendar, final Preferences userGuiPreferences); @Override boolean addEntryTo(final OlatCalendar cal, final CalendarEntry calendarEntry); boolean updateEntryFrom(final OlatCalendar cal, final CalendarEntry calendarEntry); boolean removeEntryFrom(final OlatCalendar cal, final CalendarEntry calendarEntry); void informAboutCalendarChange(final OlatCalendar cal); @Override OlatCalendar getPersonalCalendar(final Identity identity); @Override OlatCalendar getImportedCalendar(final Identity identity, final String calendarName); @Override OlatCalendar getGroupCalendar(final BusinessGroup businessGroup); @Override OlatCalendar getCourseCalendar(final ICourse course); @Override void deletePersonalCalendar(final Identity identity); @Override void deleteGroupCalendar(final BusinessGroup businessGroup); @Override void deleteCourseCalendar(final ICourse course); @Override void deleteUserData(final Identity identity, final String newDeletedUserName); @Override boolean calendarExists(String calendarType, String calendarID); @Override Calendar readCalendar(String type, String calendarID); @Override File getCalendarFile(String type, String calendarID); @Override OlatCalendar getCalendar(String type, String calendarID); @Override boolean deleteCalendar(String calendarType, String calendarID); @Override OlatCalendar buildCalendarFrom(String calendarContent, String calType, String calId); @Override boolean persistCalendar(OlatCalendar calendar); @Override void writeCalendarToFile(String calendarId, String calendarContent); }
CalendarServiceImpl implements CalendarService, UserDataDeletable { @Override public OlatCalendar getImportedCalendar(final Identity identity, final String calendarName) { return calendarDao.getCalendar(CalendarDao.TYPE_USER, importCalendarManager.getImportedCalendarID(identity, calendarName)); } private  CalendarServiceImpl();   CalendarServiceImpl(CalendarDao calendarDao, CoordinatorManager coordinatorManager); @Override CalendarConfig findCalendarConfigForIdentity(final OlatCalendar calendar, final Preferences userGuiPreferences); @Override void saveCalendarConfigForIdentity(final CalendarConfig config, final OlatCalendar calendar, final Preferences userGuiPreferences); @Override boolean addEntryTo(final OlatCalendar cal, final CalendarEntry calendarEntry); boolean updateEntryFrom(final OlatCalendar cal, final CalendarEntry calendarEntry); boolean removeEntryFrom(final OlatCalendar cal, final CalendarEntry calendarEntry); void informAboutCalendarChange(final OlatCalendar cal); @Override OlatCalendar getPersonalCalendar(final Identity identity); @Override OlatCalendar getImportedCalendar(final Identity identity, final String calendarName); @Override OlatCalendar getGroupCalendar(final BusinessGroup businessGroup); @Override OlatCalendar getCourseCalendar(final ICourse course); @Override void deletePersonalCalendar(final Identity identity); @Override void deleteGroupCalendar(final BusinessGroup businessGroup); @Override void deleteCourseCalendar(final ICourse course); @Override void deleteUserData(final Identity identity, final String newDeletedUserName); @Override boolean calendarExists(String calendarType, String calendarID); @Override Calendar readCalendar(String type, String calendarID); @Override File getCalendarFile(String type, String calendarID); @Override OlatCalendar getCalendar(String type, String calendarID); @Override boolean deleteCalendar(String calendarType, String calendarID); @Override OlatCalendar buildCalendarFrom(String calendarContent, String calType, String calId); @Override boolean persistCalendar(OlatCalendar calendar); @Override void writeCalendarToFile(String calendarId, String calendarContent);  }