Changeset 5099
- Timestamp:
- 04/30/14 08:16:55 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/trunk/vlo-importer/src/test/java/eu/clarin/cmdi/vlo/importer/ImporterTestcase.java
r5098 r5099 9 9 import org.junit.After; 10 10 import org.junit.Before; 11 import org.junit.Rule; 12 import org.junit.rules.TemporaryFolder; 11 13 12 14 public abstract class ImporterTestcase { … … 14 16 private final VloConfigFactory configFactory = new DefaultVloConfigFactory(); 15 17 protected VloConfig config; 18 19 @Rule 20 public TemporaryFolder folder = new TemporaryFolder(); 16 21 private File testDir; 17 22 … … 24 29 @After 25 30 public void cleanup() { 26 FileUtils.deleteQuietly(testDir);27 31 MetadataImporter.config = null; 28 32 } … … 30 34 @Before 31 35 public void setup() throws Exception { 32 final String baseTempPath = System.getProperty("java.io.tmpdir"); 33 testDir = new File(baseTempPath + File.separator + "testRegistry_" + System.currentTimeMillis()); 34 testDir.mkdir(); 35 testDir.deleteOnExit(); 36 testDir = folder.newFolder(String.format("vlo_%s_%d", getClass().getCanonicalName(), System.currentTimeMillis())); 36 37 37 38 // read the configuration defined in the packaged configuration file … … 40 41 // optionally, modify the configuration here 41 42 MetadataImporter.config.setComponentRegistryRESTURL("http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/"); 42 config = MetadataImporter.config; 43 config = MetadataImporter.config; 43 44 } 44 45
Note: See TracChangeset
for help on using the changeset viewer.