org.springframework.batch.item.file
Class FlatFileItemWriterTests

java.lang.Object
  extended by TestCase
      extended by org.springframework.batch.item.file.FlatFileItemWriterTests

public class FlatFileItemWriterTests
extends TestCase

Tests of regular usage for FlatFileItemWriter Exception cases will be in separate TestCase classes with different setUp and tearDown methods

Author:
robert.kasanicky, Dave Syer

Constructor Summary
FlatFileItemWriterTests()
           
 
Method Summary
protected  void setUp()
          Create temporary output file, define mock behaviour, set dependencies and initialize the object under test
protected  void tearDown()
          Release resources and delete the temporary output file
 void testAfterPropertiesSetChecksMandatory()
           
 void testCommit()
           
 void testDefaultStreamContext()
           
 void testOpenWithNonWritableFile()
           
 void testRestart()
           
 void testRollback()
           
 void testWriteRecord()
          Regular usage of write(String[], LineDescriptor) method
 void testWriteString()
          Regular usage of write(String) method
 void testWriteStringWithBogusEncoding()
          Regular usage of write(String) method
 void testWriteStringWithEncodingAfterClose()
          Regular usage of write(String) method
 void testWriteWithConverter()
          Regular usage of write(String) method
 void testWriteWithConverterAndInfiniteLoop()
          Regular usage of write(String) method
 void testWriteWithConverterAndString()
          Regular usage of write(String) method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlatFileItemWriterTests

public FlatFileItemWriterTests()
Method Detail

setUp

protected void setUp()
              throws Exception
Create temporary output file, define mock behaviour, set dependencies and initialize the object under test

Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Release resources and delete the temporary output file

Throws:
Exception

testWriteString

public void testWriteString()
                     throws Exception
Regular usage of write(String) method

Throws:
Exception

testWriteWithConverter

public void testWriteWithConverter()
                            throws Exception
Regular usage of write(String) method

Throws:
Exception

testWriteWithConverterAndInfiniteLoop

public void testWriteWithConverterAndInfiniteLoop()
                                           throws Exception
Regular usage of write(String) method

Throws:
Exception

testWriteWithConverterAndString

public void testWriteWithConverterAndString()
                                     throws Exception
Regular usage of write(String) method

Throws:
Exception

testWriteRecord

public void testWriteRecord()
                     throws Exception
Regular usage of write(String[], LineDescriptor) method

Throws:
Exception

testRollback

public void testRollback()
                  throws Exception
Throws:
Exception

testCommit

public void testCommit()
                throws Exception
Throws:
Exception

testRestart

public void testRestart()
                 throws Exception
Throws:
Exception

testOpenWithNonWritableFile

public void testOpenWithNonWritableFile()
                                 throws Exception
Throws:
Exception

testAfterPropertiesSetChecksMandatory

public void testAfterPropertiesSetChecksMandatory()
                                           throws Exception
Throws:
Exception

testDefaultStreamContext

public void testDefaultStreamContext()
                              throws Exception
Throws:
Exception

testWriteStringWithBogusEncoding

public void testWriteStringWithBogusEncoding()
                                      throws Exception
Regular usage of write(String) method

Throws:
Exception

testWriteStringWithEncodingAfterClose

public void testWriteStringWithEncodingAfterClose()
                                           throws Exception
Regular usage of write(String) method

Throws:
Exception


Copyright © 2008 SpringSource. All Rights Reserved.