org.springframework.batch.item.util
Class FileUtilsTests

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

public class FileUtilsTests
extends junit.framework.TestCase

Tests for FileUtils

Author:
Robert Kasanicky

Constructor Summary
FileUtilsTests()
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testBadFile()
           
 void testCreateDirectoryStructure()
          If the directories on the file path do not exist, they should be created
 void testNoRestart()
          No restart + file should not be overwritten => file is created if it does not exist, exception is thrown if it already exists
 void testRestart()
          In case of restart, the file is supposed to exist and exception is thrown if it does not.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

FileUtilsTests

public FileUtilsTests()
Method Detail

testNoRestart

public void testNoRestart()
                   throws Exception
No restart + file should not be overwritten => file is created if it does not exist, exception is thrown if it already exists

Throws:
Exception

testRestart

public void testRestart()
                 throws Exception
In case of restart, the file is supposed to exist and exception is thrown if it does not.

Throws:
Exception

testCreateDirectoryStructure

public void testCreateDirectoryStructure()
If the directories on the file path do not exist, they should be created


testBadFile

public void testBadFile()

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception


Copyright © 2008 SpringSource. All Rights Reserved.