From ba67b7faa1d923248aba34542f3cbc436c52ea9f Mon Sep 17 00:00:00 2001 From: lucasward Date: Tue, 25 Sep 2007 05:36:07 +0000 Subject: [PATCH] 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. --- .../springframework/batch/io/support/FileUtilsTests.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/infrastructure/src/test/java/org/springframework/batch/io/support/FileUtilsTests.java b/infrastructure/src/test/java/org/springframework/batch/io/support/FileUtilsTests.java index 0a1615cda..7421b6363 100644 --- a/infrastructure/src/test/java/org/springframework/batch/io/support/FileUtilsTests.java +++ b/infrastructure/src/test/java/org/springframework/batch/io/support/FileUtilsTests.java @@ -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(); } }