Skip to content

Instantly share code, notes, and snippets.

@kmdupr33
Created May 1, 2015 11:08
Show Gist options
  • Save kmdupr33/e03771c0a6582741ee7e to your computer and use it in GitHub Desktop.
Save kmdupr33/e03771c0a6582741ee7e to your computer and use it in GitHub Desktop.
public class SessionCalendarUpdaterTests extends TestCase {
public void testShouldClearAllSessions() throws RemoteException, OperationApplicationException {
SessionCalendarDatabase sessionCalendarDatabase = mock(SessionCalendarDatabase.class);
SessionCalendarUserPreferences sessionCalendarUserPreferences = mock(SessionCalendarUserPreferences.class);
SessionCalendarUpdater sessionCalendarUpdater = new SessionCalendarUpdater(sessionCalendarDatabase,
sessionCalendarUserPreferences);
CalendarUpdateRequest calendarUpdateRequest = new CalendarUpdateRequest(SessionCalendarUpdater.ACTION_CLEAR_ALL_SESSIONS_CALENDAR,
0,
null);
sessionCalendarUpdater.updateCalendar(calendarUpdateRequest);
verify(sessionCalendarDatabase).clearAllSessions(0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment