@Test public void basicValidateWhenDisabled() throws ConfigException { new SavedSearchConfig.Builder() .setPollForUpdates(false) .setPollingInterval(-1) .build() .basicValidate(null); }
@Override public void basicValidate(final String section) throws ConfigException { if(pollForUpdates != null && pollForUpdates && (pollingInterval == null || pollingInterval <= 0)) { throw new ConfigException("Saved Searches", "Polling interval must be positive"); } }
SavedSearchConfig implements OptionalConfigurationComponent<SavedSearchConfig> { @Override public void basicValidate(final String section) throws ConfigException { if(pollForUpdates != null && pollForUpdates && (pollingInterval == null || pollingInterval <= 0)) { throw new ConfigException("Saved Searches", "Polling interval must be positive"); } } }
SavedSearchConfig implements OptionalConfigurationComponent<SavedSearchConfig> { @Override public void basicValidate(final String section) throws ConfigException { if(pollForUpdates != null && pollForUpdates && (pollingInterval == null || pollingInterval <= 0)) { throw new ConfigException("Saved Searches", "Polling interval must be positive"); } } private  SavedSearchConfig(final Builder builder); }
SavedSearchConfig implements OptionalConfigurationComponent<SavedSearchConfig> { @Override public void basicValidate(final String section) throws ConfigException { if(pollForUpdates != null && pollForUpdates && (pollingInterval == null || pollingInterval <= 0)) { throw new ConfigException("Saved Searches", "Polling interval must be positive"); } } private  SavedSearchConfig(final Builder builder); @Override SavedSearchConfig merge(final SavedSearchConfig savedSearchConfig); @Override void basicValidate(final String section); @Override @JsonIgnore Boolean getEnabled(); }
SavedSearchConfig implements OptionalConfigurationComponent<SavedSearchConfig> { @Override public void basicValidate(final String section) throws ConfigException { if(pollForUpdates != null && pollForUpdates && (pollingInterval == null || pollingInterval <= 0)) { throw new ConfigException("Saved Searches", "Polling interval must be positive"); } } private  SavedSearchConfig(final Builder builder); @Override SavedSearchConfig merge(final SavedSearchConfig savedSearchConfig); @Override void basicValidate(final String section); @Override @JsonIgnore Boolean getEnabled();  }