improve test to use temporary file instead of creating file in project directory

This commit is contained in:
robokaso
2008-08-12 12:27:46 +00:00
parent 99d2dff8f8
commit 97e49724ce

View File

@@ -246,7 +246,7 @@ public class StaxEventItemWriterTests {
@Test
public void testNonExistantResource() throws Exception {
Resource doesntExist = createMock(Resource.class);
expect(doesntExist.getFile()).andReturn(new File("does not exist"));
expect(doesntExist.getFile()).andReturn(File.createTempFile("arbitrary", null));
expect(doesntExist.exists()).andReturn(false);
replay(doesntExist);