File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/test/java/org/scijava/io Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 33
33
34
34
import static org .junit .Assert .assertEquals ;
35
35
36
+ import java .io .File ;
37
+
36
38
import org .junit .Test ;
37
39
38
40
/**
@@ -47,7 +49,14 @@ public class FileLocationTest {
47
49
public void testFile () {
48
50
final String path = "/not/actually/a/real-file" ;
49
51
final FileLocation loc = new FileLocation (path );
50
- 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 ());
51
60
}
52
61
53
62
}
You can’t perform that action at this time.
0 commit comments