mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-21 17:29:55 +00:00
Setting up image test files to be automatically deleted.
This commit is contained in:
parent
3446cb9024
commit
da3f22aa47
@ -2,6 +2,7 @@ package com.webcodepro.applecommander.storage.filters.imagehandlers;
|
||||
|
||||
import com.webcodepro.applecommander.storage.filters.imagehandlers.SwtImage;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
@ -67,6 +68,8 @@ public class SwtImageTest extends TestCase {
|
||||
image.setPoint(x, y, color);
|
||||
}
|
||||
}
|
||||
image.save(new FileOutputStream("TestImage." + imageType)); //$NON-NLS-1$
|
||||
File tempImageFile = File.createTempFile("TestImage-", "." + imageType);
|
||||
tempImageFile.deleteOnExit();
|
||||
image.save(new FileOutputStream(tempImageFile));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user