Changeset 5100


Ignore:
Timestamp:
04/30/14 08:20:14 (10 years ago)
Author:
Twan Goosen
Message:

simplified temp folder usage in importer test case

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vlo/trunk/vlo-importer/src/test/java/eu/clarin/cmdi/vlo/importer/ImporterTestcase.java

    r5099 r5100  
    1818
    1919    @Rule
    20     public TemporaryFolder folder = new TemporaryFolder();
    21     private File testDir;
     20    public TemporaryFolder tempFolder = new TemporaryFolder();
    2221
    2322    protected File createCmdiFile(String name, String content) throws IOException {
    24         File file = File.createTempFile(name, ".cmdi", testDir);
     23        File file = tempFolder.newFile(name + System.currentTimeMillis() + ".cmdi");
    2524        FileUtils.writeStringToFile(file, content, "UTF-8");
    2625        return file;
     
    3433    @Before
    3534    public void setup() throws Exception {
    36         testDir = folder.newFolder(String.format("vlo_%s_%d", getClass().getCanonicalName(), System.currentTimeMillis()));
    37 
    3835        // read the configuration defined in the packaged configuration file
    3936        MetadataImporter.config = configFactory.newConfig();
Note: See TracChangeset for help on using the changeset viewer.