org.springframework.batch.repeat.support
Class SimpleRepeatTemplateTests

java.lang.Object
  extended by TestCase
      extended by org.springframework.batch.repeat.support.AbstractTradeBatchTests
          extended by org.springframework.batch.repeat.support.SimpleRepeatTemplateTests
Direct Known Subclasses:
TaskExecutorRepeatTemplateTests

public class SimpleRepeatTemplateTests
extends AbstractTradeBatchTests

Author:
Dave Syer

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.batch.repeat.support.AbstractTradeBatchTests
AbstractTradeBatchTests.TradeItemReader, AbstractTradeBatchTests.TradeMapper, AbstractTradeBatchTests.TradeWriter
 
Field Summary
 
Fields inherited from class org.springframework.batch.repeat.support.AbstractTradeBatchTests
NUMBER_OF_ITEMS, processor, provider
 
Constructor Summary
SimpleRepeatTemplateTests()
           
 
Method Summary
 RepeatTemplate getRepeatTemplate()
           
 void testContextClosedOnAbnormalCompletion()
          Check that the context is closed.
 void testContextClosedOnNormalCompletion()
          Check that the context is closed.
 void testCustomExitCode()
           
 void testEarlyCompletionWithContext()
          Check that a the context can be used to signal early completion.
 void testEarlyCompletionWithContextTerminated()
          Check that a the context can be used to signal early completion.
 void testEarlyCompletionWithException()
          Check that a dedicated TerminationPolicy can terminate the batch.
 void testEarlyCompletionWithPolicy()
          Check that a dedicated TerminationPolicy can terminate the batch.
 void testEarlyCompletionWithSessionAndException()
          Check that a the session can be used to signal early completion, but an exception takes precedence.
 void testExceptionHandlerCalledOnAbnormalCompletion()
          Check that the exception handler is called.
 void testExceptionThrownOnLastItem()
           
 void testExceptionUnwrapping()
          Checked exceptions are wrapped into runtime RepeatException.
 void testExecute()
           
 void testNestedSession()
           
 void testNestedSessionTerminatesBeforeIteration()
           
 void testOuterContextPreserved()
           
 void testResult()
          Test that a result is returned from the batch.
 
Methods inherited from class org.springframework.batch.repeat.support.AbstractTradeBatchTests
setUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleRepeatTemplateTests

public SimpleRepeatTemplateTests()
Method Detail

getRepeatTemplate

public RepeatTemplate getRepeatTemplate()

testExecute

public void testExecute()
                 throws Exception
Throws:
Exception

testEarlyCompletionWithPolicy

public void testEarlyCompletionWithPolicy()
                                   throws Exception
Check that a dedicated TerminationPolicy can terminate the batch.

Throws:
Exception

testEarlyCompletionWithException

public void testEarlyCompletionWithException()
                                      throws Exception
Check that a dedicated TerminationPolicy can terminate the batch.

Throws:
Exception

testContextClosedOnNormalCompletion

public void testContextClosedOnNormalCompletion()
                                         throws Exception
Check that the context is closed.

Throws:
Exception

testContextClosedOnAbnormalCompletion

public void testContextClosedOnAbnormalCompletion()
                                           throws Exception
Check that the context is closed.

Throws:
Exception

testExceptionHandlerCalledOnAbnormalCompletion

public void testExceptionHandlerCalledOnAbnormalCompletion()
                                                    throws Exception
Check that the exception handler is called.

Throws:
Exception

testEarlyCompletionWithContext

public void testEarlyCompletionWithContext()
                                    throws Exception
Check that a the context can be used to signal early completion.

Throws:
Exception

testEarlyCompletionWithContextTerminated

public void testEarlyCompletionWithContextTerminated()
                                              throws Exception
Check that a the context can be used to signal early completion.

Throws:
Exception

testNestedSession

public void testNestedSession()
                       throws Exception
Throws:
Exception

testNestedSessionTerminatesBeforeIteration

public void testNestedSessionTerminatesBeforeIteration()
                                                throws Exception
Throws:
Exception

testOuterContextPreserved

public void testOuterContextPreserved()
                               throws Exception
Throws:
Exception

testResult

public void testResult()
                throws Exception
Test that a result is returned from the batch.

Throws:
Exception

testExceptionThrownOnLastItem

public void testExceptionThrownOnLastItem()
                                   throws Exception
Throws:
Exception

testEarlyCompletionWithSessionAndException

public void testEarlyCompletionWithSessionAndException()
                                                throws Exception
Check that a the session can be used to signal early completion, but an exception takes precedence.

Throws:
Exception

testCustomExitCode

public void testCustomExitCode()

testExceptionUnwrapping

public void testExceptionUnwrapping()
Checked exceptions are wrapped into runtime RepeatException. RepeatException should be unwrapped before before it is passed to listeners and exception handler.



Copyright © 2008 SpringSource. All Rights Reserved.