OPEN - issue BATCH-116: Create XML input/output source which will work directly with StAX parser
http://opensource.atlassian.com/projects/spring/browse/BATCH-116 FileUtilsTest failure scenario only passed on windows.
This commit is contained in:
@@ -106,12 +106,18 @@ public class FileUtilsTests extends TestCase {
|
||||
|
||||
public void testBadFile(){
|
||||
|
||||
File file = new File("#:/.out");
|
||||
File file = new File("new file"){
|
||||
public boolean createNewFile() throws IOException {
|
||||
throw new IOException();
|
||||
}
|
||||
};
|
||||
try{
|
||||
FileUtils.setUpOutputFile(file, false, false);
|
||||
fail();
|
||||
}catch(DataAccessResourceFailureException ex){
|
||||
assertTrue(ex.getCause() instanceof IOException);
|
||||
}finally{
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user