Codota Logo
org.springframework.batch.test
Code IndexAdd Codota to your IDE (free)

How to use org.springframework.batch.test

Best Java code snippets using org.springframework.batch.test (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-batch

/**
 * Convenient method for subclasses to grab a {@link StepRunner} for running
 * steps by name.
 * 
 * @return a {@link StepRunner}
 */
protected StepRunner getStepRunner() {
  if (this.stepRunner == null) {
    this.stepRunner = new StepRunner(getJobLauncher(), getJobRepository());
  }
  return this.stepRunner;
}
origin: spring-projects/spring-batch

/**
 * Convenient method for subclasses to grab a {@link StepRunner} for running
 * steps by name.
 * 
 * @return a {@link StepRunner}
 */
protected StepRunner getStepRunner() {
  if (this.stepRunner == null) {
    this.stepRunner = new StepRunner(getJobLauncher(), getJobRepository());
  }
  return this.stepRunner;
}
origin: spring-projects/spring-batch

/**
 * Create a {@link StepExecution} with default parameters.
 *
 * @return a {@link StepExecution} with stepName="step" and
 * id=DEFAULT_STEP_EXECUTION_ID
 */
public static StepExecution createStepExecution() {
  return createStepExecution(DEFAULT_STEP_NAME, DEFAULT_STEP_EXECUTION_ID);
}
origin: spring-projects/spring-batch

/**
 * Launch the entire job, including all steps.
 * 
 * @return JobExecution, so that the test can validate the exit status
 * @throws Exception thrown if error occurs launching the job.
 */
public JobExecution launchJob() throws Exception {
  return this.launchJob(this.getUniqueJobParameters());
}
origin: spring-projects/spring-batch

/**
 * Create a {@link StepExecution} with the parameters provided.
 *
 * @param stepName the stepName for the {@link StepExecution}
 * @param executionId the id for the {@link StepExecution}
 * @return a {@link StepExecution} with a {@link JobExecution} having
 * default properties
 */
public static StepExecution createStepExecution(String stepName, Long executionId) {
  return createStepExecution(createJobExecution(), stepName, executionId);
}
origin: spring-projects/spring-batch

  @Bean
  public JobLauncherTestUtils testUtils() {
    JobLauncherTestUtils jobLauncherTestUtils = new JobLauncherTestUtils();
    jobLauncherTestUtils.setJob(job());
    return jobLauncherTestUtils;
  }
}
origin: spring-projects/spring-batch

/**
 * Launch just the specified step in the job. A unique set of JobParameters
 * will automatically be generated. An IllegalStateException is thrown if
 * there is no Step with the given name.
 * 
 * @param stepName The name of the step to launch
 * @return JobExecution
 */
public JobExecution launchStep(String stepName) {
  return this.launchStep(stepName, this.getUniqueJobParameters(), null);
}
origin: spring-projects/spring-batch

/**
 * Launch just the specified step as its own job. A unique set of
 * JobParameters will automatically be generated. An IllegalStateException
 * is thrown if there is no Step with the given name.
 *
 * @param step The step to launch
 * @return JobExecution
 */
public JobExecution launchStep(Step step) {
  return this.launchStep(step, this.makeUniqueJobParameters(), null);
}
origin: spring-projects/spring-batch

private void initialize() {
  if (!this.initialized) {
    destroy();
    if (this.initScripts != null) {
      for (Resource initScript : this.initScripts) {
        doExecuteScript(initScript);
      }
    }
    this.initialized = true;
  }
}
origin: spring-projects/spring-batch

/**
 * Launch the entire job, including all steps.
 * 
 * @return JobExecution, so that the test can validate the exit status
 *
 * @throws Exception is thrown if error occurs.
 */
protected JobExecution launchJob() throws Exception {
  return this.launchJob(this.getUniqueJobParameters());
}
origin: spring-projects/spring-batch

/**
 * Launch just the specified step in the job. A unique set of JobParameters
 * will automatically be generated. An IllegalStateException is thrown if
 * there is no Step with the given name.
 * 
 * @param stepName The name of the step to launch
 * @return JobExecution
 */
public JobExecution launchStep(String stepName) {
  return this.launchStep(stepName, this.getUniqueJobParameters(), null);
}
origin: spring-projects/spring-batch

/**
 * Create a {@link JobExecution} with default parameters.
 *
 * @return a {@link JobExecution} with id=DEFAULT_JOB_EXECUTION_ID
 */
public static JobExecution createJobExecution() {
  return createJobExecution(DEFAULT_JOB_EXECUTION_ID);
}
origin: spring-projects/spring-batch

/**
 * Launch just the specified step as its own job. An IllegalStateException
 * is thrown if there is no Step with the given name.
 *
 * @param step The step to launch
 * @param jobParameters The JobParameters to use during the launch
 * @return JobExecution
 */
public JobExecution launchStep(Step step, JobParameters jobParameters) {
  return this.launchStep(step, jobParameters, null);
}
origin: spring-projects/spring-batch

/**
 * Launch just the specified step in the job. An IllegalStateException is
 * thrown if there is no Step with the given name.
 * 
 * @param stepName The name of the step to launch
 * @param jobParameters The JobParameters to use during the launch
 * @return JobExecution
 */
public JobExecution launchStep(String stepName, JobParameters jobParameters) {
  return this.launchStep(stepName, jobParameters, null);
}
origin: spring-projects/spring-batch

/**
 * Create a {@link JobRepositoryTestUtils} with all its mandatory
 * properties.
 *
 * @param jobRepository a {@link JobRepository} backed by a database
 * @param dataSource a {@link DataSource}
 */
public JobRepositoryTestUtils(JobRepository jobRepository, DataSource dataSource) {
  super();
  this.jobRepository = jobRepository;
  setDataSource(dataSource);
}
origin: spring-projects/spring-batch

@Test
public void testWithParameters() throws Exception {
  testJobParameters(new WithJobExecutionFactory());
}
origin: spring-projects/spring-batch

@Test
public void testWithParameters() throws Exception {
  testJobParameters(new WithStepExecutionFactory());
}
origin: spring-projects/spring-batch

/**
 * Launch just the specified step in the job. An IllegalStateException is
 * thrown if there is no Step with the given name.
 * 
 * @param stepName The name of the step to launch
 * @param jobParameters The JobParameters to use during the launch
 * @return JobExecution
 */
public JobExecution launchStep(String stepName, JobParameters jobParameters) {
  return this.launchStep(stepName, jobParameters, null);
}
origin: spring-projects/spring-batch

/**
 * Launch just the specified step in the job. A unique set of JobParameters
 * will automatically be generated. An IllegalStateException is thrown if
 * there is no Step with the given name.
 * 
 * @param stepName The name of the step to launch
 * @param jobExecutionContext An ExecutionContext whose values will be
 * loaded into the Job ExecutionContext prior to launching the step.
 * @return JobExecution
 */
public JobExecution launchStep(String stepName, ExecutionContext jobExecutionContext) {
  return this.launchStep(stepName, this.getUniqueJobParameters(), jobExecutionContext);
}
origin: spring-projects/spring-batch

/**
 * Create a {@link JobExecution} with the parameters provided.
 *
 * @param executionId the id for the {@link JobExecution}
 * @return a {@link JobExecution} with valid {@link JobInstance}
 */
public static JobExecution createJobExecution(Long executionId) {
  return createJobExecution(DEFAULT_JOB_NAME, DEFAULT_JOB_INSTANCE_ID, executionId);
}
org.springframework.batch.test

Most used classes

  • JobLauncherTestUtils
    Utility class for testing batch jobs. It provides methods for launching an entire AbstractJob, allo
  • AssertFile
    This class can be used to assert that two files are the same.
  • MetaDataInstanceFactory
    Convenience methods for creating test instances of JobExecution, JobInstance and StepExecution.
  • StepRunner
    Utility class for executing steps outside of a Job. This is useful in end to end testing in order to
  • JobRepositoryTestUtils
    Convenience class for creating and removing JobExecution instances from a database. Typical usage in
  • DataSourceInitializer,
  • JobScopeTestExecutionListener,
  • StepScopeTestExecutionListener,
  • StepScopeTestUtils,
  • BatchTestContextCustomizer,
  • AbstractSampleJobTests,
  • AssertFileTests,
  • ExecutionContextTestUtils,
  • JobLauncherTestUtilsTests$TestJobConfiguration,
  • JobScopeTestExecutionListener$ExtractorMethodCallback,
  • JobScopeTestExecutionListenerTests$MockTestContextManager,
  • JobScopeTestExecutionListenerTests$WithJobExecutionFactory,
  • JobScopeTestExecutionListenerTests,
  • StepScopeAnnotatedListenerIntegrationTests$StatefulItemReader
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now