@Test(expected = SpringBatchLightminApplicationException.class) public void validateSchedulerNullTest() { final JobSchedulerConfiguration jobSchedulerConfiguration = new JobSchedulerConfiguration(); jobSchedulerConfiguration.setCronExpression("0 0 12 * * ?"); jobSchedulerConfiguration.setJobSchedulerType(null); jobSchedulerConfiguration.setTaskExecutorType(TaskExecutorType.SYNCHRONOUS); jobSchedulerConfiguration.validate(); }
void validate() { if (this.jobSchedulerType == null) { this.throwExceptionAndLogError("jobSchedulerType must not be null"); } if (this.taskExecutorType == null) { this.throwExceptionAndLogError("taskExecutorType must not be null"); } if (JobSchedulerType.CRON.equals(this.jobSchedulerType)) { this.validateCron(); } else if (JobSchedulerType.PERIOD.equals(this.jobSchedulerType)) { this.validatePeriod(); } else { this.throwExceptionAndLogError("Unknown jobSchedulerType: " + this.jobSchedulerType); } }
JobSchedulerConfiguration extends AbstractConfiguration { void validate() { if (this.jobSchedulerType == null) { this.throwExceptionAndLogError("jobSchedulerType must not be null"); } if (this.taskExecutorType == null) { this.throwExceptionAndLogError("taskExecutorType must not be null"); } if (JobSchedulerType.CRON.equals(this.jobSchedulerType)) { this.validateCron(); } else if (JobSchedulerType.PERIOD.equals(this.jobSchedulerType)) { this.validatePeriod(); } else { this.throwExceptionAndLogError("Unknown jobSchedulerType: " + this.jobSchedulerType); } } }
JobSchedulerConfiguration extends AbstractConfiguration { void validate() { if (this.jobSchedulerType == null) { this.throwExceptionAndLogError("jobSchedulerType must not be null"); } if (this.taskExecutorType == null) { this.throwExceptionAndLogError("taskExecutorType must not be null"); } if (JobSchedulerType.CRON.equals(this.jobSchedulerType)) { this.validateCron(); } else if (JobSchedulerType.PERIOD.equals(this.jobSchedulerType)) { this.validatePeriod(); } else { this.throwExceptionAndLogError("Unknown jobSchedulerType: " + this.jobSchedulerType); } }  }
JobSchedulerConfiguration extends AbstractConfiguration { void validate() { if (this.jobSchedulerType == null) { this.throwExceptionAndLogError("jobSchedulerType must not be null"); } if (this.taskExecutorType == null) { this.throwExceptionAndLogError("taskExecutorType must not be null"); } if (JobSchedulerType.CRON.equals(this.jobSchedulerType)) { this.validateCron(); } else if (JobSchedulerType.PERIOD.equals(this.jobSchedulerType)) { this.validatePeriod(); } else { this.throwExceptionAndLogError("Unknown jobSchedulerType: " + this.jobSchedulerType); } }   }
JobSchedulerConfiguration extends AbstractConfiguration { void validate() { if (this.jobSchedulerType == null) { this.throwExceptionAndLogError("jobSchedulerType must not be null"); } if (this.taskExecutorType == null) { this.throwExceptionAndLogError("taskExecutorType must not be null"); } if (JobSchedulerType.CRON.equals(this.jobSchedulerType)) { this.validateCron(); } else if (JobSchedulerType.PERIOD.equals(this.jobSchedulerType)) { this.validatePeriod(); } else { this.throwExceptionAndLogError("Unknown jobSchedulerType: " + this.jobSchedulerType); } }    }