org.springframework.batch.item.xml
Class StaxEventItemReaderTests

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.springframework.batch.item.xml.StaxEventItemReaderTests
All Implemented Interfaces:
junit.framework.Test

public class StaxEventItemReaderTests
extends junit.framework.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 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 junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StaxEventItemReaderTests

public StaxEventItemReaderTests()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
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()
                 throws Exception
Save restart data and restore from it.

Throws:
Exception

testRestoreWorksFromClosedStream

public void testRestoreWorksFromClosedStream()
                                      throws Exception
Throws:
Exception

testRollback

public void testRollback()
                  throws Exception
Rollback to last commited record.

Throws:
Exception

testExecutionContext

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

Throws:
Exception

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.