Package org.springframework.batch.core.scope.context

Examples of org.springframework.batch.core.scope.context.StepContext


  private void testJobParameters(Object target) throws Exception {
    TestContext testContext = getTestContext(target);
    listener.prepareTestInstance(testContext);
    try {
      listener.beforeTestMethod(testContext);
      StepContext context = StepSynchronizationManager.getContext();
      assertNotNull(context);
      assertEquals("spam", context.getJobParameters().get("foo"));
    }
    finally {
      listener.afterTestMethod(testContext);
    }
    assertNull(StepSynchronizationManager.getContext());
View Full Code Here


    StepExecution stepExecution = new StepExecution("foo", null);
    ExecutionContext stepExecutionContext = new ExecutionContext();
    stepExecutionContext.putString("filePath", "foo.txt");
    stepExecution.setExecutionContext(stepExecutionContext);
    StepContext stepContext = new StepContext(stepExecution);
    ChunkContext chunkContext = new ChunkContext(stepContext);

    RemoteFileTemplate template = new RemoteFileTemplate(factory);
    template.setBeanFactory(mock(BeanFactory.class));
    template.afterPropertiesSet();
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.scope.context.StepContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.