1 |
alfonx |
1328 |
package skrueger.linux; |
2 |
|
|
|
3 |
|
|
import static org.junit.Assert.assertFalse; |
4 |
|
|
import static org.junit.Assert.assertTrue; |
5 |
|
|
|
6 |
|
|
import java.io.File; |
7 |
|
|
import java.io.IOException; |
8 |
|
|
|
9 |
|
|
import org.junit.After; |
10 |
|
|
import org.junit.Before; |
11 |
|
|
import org.junit.Test; |
12 |
|
|
|
13 |
|
|
import schmitzm.swing.TestingUtil; |
14 |
|
|
|
15 |
|
|
public class LinuxUtilTest { |
16 |
|
|
|
17 |
|
|
@Before |
18 |
|
|
public void setUp() throws Exception { |
19 |
|
|
} |
20 |
|
|
|
21 |
|
|
@After |
22 |
|
|
public void tearDown() throws Exception { |
23 |
|
|
} |
24 |
|
|
|
25 |
|
|
@Test |
26 |
|
|
public void testCreateSymlink() throws IOException, InterruptedException { |
27 |
|
|
File from = TestingUtil.getNewTempDir(); |
28 |
|
|
File to = new File(TestingUtil.getNewTempDir(), "link"); |
29 |
|
|
assertFalse(to.exists()); |
30 |
|
|
|
31 |
|
|
LinuxUtil.createSymlink(from, to); |
32 |
|
|
assertTrue(to.exists()); |
33 |
|
|
|
34 |
|
|
} |
35 |
|
|
|
36 |
|
|
} |