org.springframework.batch.repeat.exception
Class SimpleLimitExceptionHandlerTests

java.lang.Object
  extended by TestCase
      extended by org.springframework.batch.repeat.exception.SimpleLimitExceptionHandlerTests

public class SimpleLimitExceptionHandlerTests
extends TestCase

Unit tests for SimpleLimitExceptionHandler

Author:
Robert Kasanicky, Dave Syer

Constructor Summary
SimpleLimitExceptionHandlerTests()
           
 
Method Summary
 void testExceptionNotThrownBelowLimit()
          TransactionInvalidExceptions are swallowed until the exception limit is exceeded.
 void testExceptionThrownAboveLimit()
          TransactionInvalidExceptions are swallowed until the exception limit is exceeded.
 void testInitializeWithNullContext()
           
 void testInitializeWithNullContextAndNullException()
           
 void testLimitedExceptionNotThrownFromSiblings()
          TransactionInvalidException should only be rethrown below the exception limit.
 void testLimitedExceptionThrownFromSiblingsWhenUsingParent()
          TransactionInvalidException should only be rethrown below the exception limit.
 void testLimitedExceptionTypeNotThrown()
          TransactionInvalidException should only be rethrown below the exception limit.
 void testNormalExceptionThrown()
          Other than nominated exception type should be rethrown, ignoring the exception limit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleLimitExceptionHandlerTests

public SimpleLimitExceptionHandlerTests()
Method Detail

testInitializeWithNullContext

public void testInitializeWithNullContext()
                                   throws Throwable
Throws:
Throwable

testInitializeWithNullContextAndNullException

public void testInitializeWithNullContextAndNullException()
                                                   throws Throwable
Throws:
Throwable

testNormalExceptionThrown

public void testNormalExceptionThrown()
                               throws Throwable
Other than nominated exception type should be rethrown, ignoring the exception limit.

Throws:
Exception
Throwable

testLimitedExceptionTypeNotThrown

public void testLimitedExceptionTypeNotThrown()
                                       throws Throwable
TransactionInvalidException should only be rethrown below the exception limit.

Throws:
Exception
Throwable

testLimitedExceptionNotThrownFromSiblings

public void testLimitedExceptionNotThrownFromSiblings()
                                               throws Throwable
TransactionInvalidException should only be rethrown below the exception limit.

Throws:
Exception
Throwable

testLimitedExceptionThrownFromSiblingsWhenUsingParent

public void testLimitedExceptionThrownFromSiblingsWhenUsingParent()
                                                           throws Throwable
TransactionInvalidException should only be rethrown below the exception limit.

Throws:
Exception
Throwable

testExceptionNotThrownBelowLimit

public void testExceptionNotThrownBelowLimit()
                                      throws Throwable
TransactionInvalidExceptions are swallowed until the exception limit is exceeded. After the limit is exceeded exceptions are rethrown as BatchCriticalExceptions

Throws:
Throwable

testExceptionThrownAboveLimit

public void testExceptionThrownAboveLimit()
                                   throws Throwable
TransactionInvalidExceptions are swallowed until the exception limit is exceeded. After the limit is exceeded exceptions are rethrown as BatchCriticalExceptions

Throws:
Throwable


Copyright © 2008 SpringSource. All Rights Reserved.