@Test void shouldFilterDefault() { assertFalse(this.notificationFilter.shouldFilter(mock(Event.class), Collections.emptyList())); }
public boolean shouldFilter(Event event, Collection<NotificationPreference> preferences) { for (NotificationPreference preference : preferences) { Object preferenceEventType = preference.getProperties().get(NotificationPreferenceProperty.EVENT_TYPE); if (preferenceEventType != null && event.getType().equals(preferenceEventType) && preference.getStartDate().after(event.getDate())) { return true; } } return false; }
PreferenceDateNotificationFilter { public boolean shouldFilter(Event event, Collection<NotificationPreference> preferences) { for (NotificationPreference preference : preferences) { Object preferenceEventType = preference.getProperties().get(NotificationPreferenceProperty.EVENT_TYPE); if (preferenceEventType != null && event.getType().equals(preferenceEventType) && preference.getStartDate().after(event.getDate())) { return true; } } return false; } }
PreferenceDateNotificationFilter { public boolean shouldFilter(Event event, Collection<NotificationPreference> preferences) { for (NotificationPreference preference : preferences) { Object preferenceEventType = preference.getProperties().get(NotificationPreferenceProperty.EVENT_TYPE); if (preferenceEventType != null && event.getType().equals(preferenceEventType) && preference.getStartDate().after(event.getDate())) { return true; } } return false; }  }
PreferenceDateNotificationFilter { public boolean shouldFilter(Event event, Collection<NotificationPreference> preferences) { for (NotificationPreference preference : preferences) { Object preferenceEventType = preference.getProperties().get(NotificationPreferenceProperty.EVENT_TYPE); if (preferenceEventType != null && event.getType().equals(preferenceEventType) && preference.getStartDate().after(event.getDate())) { return true; } } return false; }  boolean shouldFilter(Event event, Collection<NotificationPreference> preferences); }
PreferenceDateNotificationFilter { public boolean shouldFilter(Event event, Collection<NotificationPreference> preferences) { for (NotificationPreference preference : preferences) { Object preferenceEventType = preference.getProperties().get(NotificationPreferenceProperty.EVENT_TYPE); if (preferenceEventType != null && event.getType().equals(preferenceEventType) && preference.getStartDate().after(event.getDate())) { return true; } } return false; }  boolean shouldFilter(Event event, Collection<NotificationPreference> preferences);  }