org.springframework.batch.item.xml
Class StaxEventItemReaderTests

java.lang.Object
  extended by TestCase
      extended by org.springframework.batch.item.xml.StaxEventItemReaderTests

public class StaxEventItemReaderTests
extends TestCase

Tests for StaxEventItemReader.

Author:
Robert Kasanicky

Constructor Summary
StaxEventItemReaderTests()
           
 
Method Summary
protected  void setUp()
           
 void testAfterPropertesSetException()
           
 void testAfterPropertiesSet()
           
 void testClose()
           
 void testCloseWithoutOpen()
           
 void testExecutionContext()
          Statistics return the current record count.
 void testFragmentWrapping()
          Regular usage scenario.
 void testInvalidRestore()
          Restore point must not exceed end of file, input source must not be already initialised when restoring.
 void testMoveCursorToNextFragment()
          Cursor is moved before beginning of next fragment.
 void testNonExistentResource()
           
 void testOpenBadIOInput()
           
 void testRestart()
          Save restart data and restore from it.
 void testRestoreWorksFromClosedStream()
           
 void testRollback()
          Rollback to last commited record.
 void testRuntimeFileCreation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaxEventItemReaderTests

public StaxEventItemReaderTests()
Method Detail

setUp

protected void setUp()
              throws Exception
Throws:
Exception

testAfterPropertiesSet

public void testAfterPropertiesSet()
                            throws Exception
Throws:
Exception

testAfterPropertesSetException

public void testAfterPropertesSetException()
                                    throws Exception
Throws:
Exception

testFragmentWrapping

public void testFragmentWrapping()
                          throws Exception
Regular usage scenario. ItemReader should pass XML fragments to deserializer wrapped with StartDocument and EndDocument events.

Throws:
Exception

testMoveCursorToNextFragment

public void testMoveCursorToNextFragment()
                                  throws javax.xml.stream.XMLStreamException,
                                         javax.xml.stream.FactoryConfigurationError,
                                         IOException
Cursor is moved before beginning of next fragment.

Throws:
javax.xml.stream.XMLStreamException
javax.xml.stream.FactoryConfigurationError
IOException

testRestart

public void testRestart()
Save restart data and restore from it.


testInvalidRestore

public void testInvalidRestore()
Restore point must not exceed end of file, input source must not be already initialised when restoring.


testRestoreWorksFromClosedStream

public void testRestoreWorksFromClosedStream()
                                      throws Exception
Throws:
Exception

testRollback

public void testRollback()
Rollback to last commited record.


testExecutionContext

public void testExecutionContext()
Statistics return the current record count. Calling read after end of input does not increase the counter.


testCloseWithoutOpen

public void testCloseWithoutOpen()
                          throws Exception
Throws:
Exception

testClose

public void testClose()
               throws Exception
Throws:
Exception

testOpenBadIOInput

public void testOpenBadIOInput()

testNonExistentResource

public void testNonExistentResource()
                             throws Exception
Throws:
Exception

testRuntimeFileCreation

public void testRuntimeFileCreation()
                             throws Exception
Throws:
Exception


Copyright © 2008 SpringSource. All Rights Reserved.