We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae75cfa commit 31c38bdCopy full SHA for 31c38bd
1 file changed
src/test/java/org/scijava/io/FileLocationTest.java
@@ -33,6 +33,8 @@
33
34
import static org.junit.Assert.assertEquals;
35
36
+import java.io.File;
37
+
38
import org.junit.Test;
39
40
/**
@@ -47,7 +49,14 @@ public class FileLocationTest {
47
49
public void testFile() {
48
50
final String path = "/not/actually/a/real-file";
51
final FileLocation loc = new FileLocation(path);
- assertEquals(path, loc.getFile().getPath());
52
+ final File realFile = loc.getFile();
53
+ assertEquals("real-file", realFile.getName());
54
+ final File a = realFile.getParentFile();
55
+ assertEquals("a", a.getName());
56
+ final File actually = a.getParentFile();
57
+ assertEquals("actually", actually.getName());
58
+ final File not = actually.getParentFile();
59
+ assertEquals("not", not.getName());
60
}
61
62
0 commit comments