@Test public void testPurgeCalendars_retainIndefinitely() { entityHandler.purgeCalendars(mockedServiceConnector, PurgeOptions.RETAIN_INDEFINITELY, null); verifyZeroInteractions(mockedService, mockedEm, mockedAuditPropertyEntityAdapter, mockedOutlookDao, mockedContainerEntityDao); }
void purgeCalendars(ServiceConnector connector, PurgeOptions purgeOptions, Integer daysClosed) { switch (purgeOptions) { case RETAIN_INDEFINITELY: return; case CLOSED: case CLOSED_X_DAYS: List<AcmContainerEntity> purgeCandidates = getEntities(daysClosed); purgeCalendars(connector, purgeCandidates); break; } }
CalendarEntityHandler { void purgeCalendars(ServiceConnector connector, PurgeOptions purgeOptions, Integer daysClosed) { switch (purgeOptions) { case RETAIN_INDEFINITELY: return; case CLOSED: case CLOSED_X_DAYS: List<AcmContainerEntity> purgeCandidates = getEntities(daysClosed); purgeCalendars(connector, purgeCandidates); break; } } }
CalendarEntityHandler { void purgeCalendars(ServiceConnector connector, PurgeOptions purgeOptions, Integer daysClosed) { switch (purgeOptions) { case RETAIN_INDEFINITELY: return; case CLOSED: case CLOSED_X_DAYS: List<AcmContainerEntity> purgeCandidates = getEntities(daysClosed); purgeCalendars(connector, purgeCandidates); break; } } CalendarEntityHandler(); }
CalendarEntityHandler { void purgeCalendars(ServiceConnector connector, PurgeOptions purgeOptions, Integer daysClosed) { switch (purgeOptions) { case RETAIN_INDEFINITELY: return; case CLOSED: case CLOSED_X_DAYS: List<AcmContainerEntity> purgeCandidates = getEntities(daysClosed); purgeCalendars(connector, purgeCandidates); break; } } CalendarEntityHandler(); void setOutlookDao(OutlookDao outlookDao); void setContainerEntityDao(AcmContainerDao containerEntityDao); void setAuditPropertyEntityAdapter(AuditPropertyEntityAdapter auditPropertyEntityAdapter); void setClosedStates(String closedStates); void setEntityType(String entityType); void setEntityTypeForQuery(String entityTypeForQuery); void setEntityIdForQuery(String entityIdForQuery); void setPermissionEvaluator(PermissionEvaluator permissionEvaluator); void setReadPermission(Object readPermission); void setWritePermission(Object writePermission); void setDeletePermission(Object deletePermission); void setFolderCreatorDao(AcmOutlookFolderCreatorDao folderCreatorDao); String getEntityType(); }
CalendarEntityHandler { void purgeCalendars(ServiceConnector connector, PurgeOptions purgeOptions, Integer daysClosed) { switch (purgeOptions) { case RETAIN_INDEFINITELY: return; case CLOSED: case CLOSED_X_DAYS: List<AcmContainerEntity> purgeCandidates = getEntities(daysClosed); purgeCalendars(connector, purgeCandidates); break; } } CalendarEntityHandler(); void setOutlookDao(OutlookDao outlookDao); void setContainerEntityDao(AcmContainerDao containerEntityDao); void setAuditPropertyEntityAdapter(AuditPropertyEntityAdapter auditPropertyEntityAdapter); void setClosedStates(String closedStates); void setEntityType(String entityType); void setEntityTypeForQuery(String entityTypeForQuery); void setEntityIdForQuery(String entityIdForQuery); void setPermissionEvaluator(PermissionEvaluator permissionEvaluator); void setReadPermission(Object readPermission); void setWritePermission(Object writePermission); void setDeletePermission(Object deletePermission); void setFolderCreatorDao(AcmOutlookFolderCreatorDao folderCreatorDao); String getEntityType();  }