|
16 | 16 | */ |
17 | 17 | package org.apache.commons.io.input; |
18 | 18 |
|
19 | | -import java.io.*; |
| 19 | +import static org.junit.Assert.assertEquals; |
| 20 | +import static org.junit.Assert.assertFalse; |
| 21 | +import static org.junit.Assert.assertNotNull; |
| 22 | +import static org.junit.Assert.assertNull; |
| 23 | +import static org.junit.Assert.assertTrue; |
| 24 | +import static org.junit.Assert.fail; |
| 25 | + |
| 26 | +import java.io.BufferedOutputStream; |
| 27 | +import java.io.BufferedReader; |
| 28 | +import java.io.File; |
| 29 | +import java.io.FileInputStream; |
| 30 | +import java.io.FileNotFoundException; |
| 31 | +import java.io.FileOutputStream; |
| 32 | +import java.io.FileWriter; |
| 33 | +import java.io.IOException; |
| 34 | +import java.io.InputStreamReader; |
| 35 | +import java.io.OutputStreamWriter; |
| 36 | +import java.io.RandomAccessFile; |
| 37 | +import java.io.Writer; |
20 | 38 | import java.nio.charset.Charset; |
21 | 39 | import java.nio.charset.StandardCharsets; |
22 | 40 | import java.util.ArrayList; |
|
27 | 45 |
|
28 | 46 | import org.apache.commons.io.FileUtils; |
29 | 47 | import org.apache.commons.io.IOUtils; |
30 | | -import org.apache.commons.io.testtools.FileBasedTestCase; |
31 | 48 | import org.apache.commons.io.testtools.TestUtils; |
32 | 49 | import org.junit.After; |
| 50 | +import org.junit.Rule; |
33 | 51 | import org.junit.Test; |
34 | | - |
35 | | -import static org.junit.Assert.assertEquals; |
36 | | -import static org.junit.Assert.assertFalse; |
37 | | -import static org.junit.Assert.assertNotNull; |
38 | | -import static org.junit.Assert.assertNull; |
39 | | -import static org.junit.Assert.assertTrue; |
40 | | -import static org.junit.Assert.fail; |
| 52 | +import org.junit.rules.TemporaryFolder; |
41 | 53 |
|
42 | 54 | /** |
43 | 55 | * Tests for {@link Tailer}. |
44 | 56 | * |
45 | 57 | */ |
46 | | -public class TailerTest extends FileBasedTestCase { |
| 58 | +public class TailerTest { |
| 59 | + |
| 60 | + @Rule |
| 61 | + public TemporaryFolder temporaryFolder = new TemporaryFolder(); |
| 62 | + |
| 63 | + private File getTestDirectory() { |
| 64 | + return temporaryFolder.getRoot(); |
| 65 | + } |
47 | 66 |
|
48 | 67 | private Tailer tailer; |
49 | 68 |
|
|
0 commit comments