1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.settings4j.config;
19
20 import java.io.File;
21
22 import junit.framework.TestCase;
23
24 import org.apache.commons.io.FileUtils;
25 import org.settings4j.test.TestUtils;
26
27
28
29
30
31
32 public abstract class AbstractTestSettings4jConfig extends TestCase {
33
34
35 private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(AbstractTestSettings4jConfig.class);
36
37
38 @Override
39 protected void setUp() throws Exception {
40 final File tmpFolder = TestUtils.getTmpFolder();
41 LOG.info("Use temporary Folder: {}", tmpFolder.getAbsolutePath());
42 FileUtils.deleteDirectory(tmpFolder);
43
44 final File testFolder = TestUtils.getTestFolder();
45 LOG.info("Use test Folder: {}", testFolder.getAbsolutePath());
46 FileUtils.deleteDirectory(testFolder);
47 super.setUp();
48 }
49
50
51 @Override
52 protected void tearDown() throws Exception {
53 final File tmpFolder = TestUtils.getTmpFolder();
54 FileUtils.deleteDirectory(tmpFolder);
55 final File testFolder = TestUtils.getTestFolder();
56 FileUtils.deleteDirectory(testFolder);
57 super.tearDown();
58 }
59
60 }