File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
convex-core/src/test/java/convex/core/util Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import static org .junit .jupiter .api .Assertions .assertEquals ;
4
4
import static org .junit .jupiter .api .Assertions .assertNotNull ;
5
+ import static org .junit .jupiter .api .Assertions .assertTrue ;
6
+
7
+ import java .io .File ;
8
+ import java .nio .file .Files ;
9
+ import java .nio .file .Path ;
5
10
6
11
import org .junit .jupiter .api .Test ;
7
12
8
13
public class FileUtilsTest {
9
14
10
15
11
- @ Test public void testGetPath () {
16
+ @ Test public void testGetHomePath () {
12
17
String home =System .getProperty ("user.home" );
13
18
assertNotNull (home );
14
19
15
- assertEquals (home ,FileUtils .getFile ("~" ).toString ());
16
- assertEquals (home ,FileUtils .getPath ("~" ).toString ());
20
+ File file =FileUtils .getFile ("~" );
21
+ assertEquals (home ,file .toString ());
22
+ assertTrue (file .isAbsolute ());
23
+ assertTrue (file .isDirectory ());
24
+
25
+ Path path =FileUtils .getPath ("~" );
26
+ assertEquals (home ,path .toString ());
27
+ assertTrue (path .isAbsolute ());
28
+ assertTrue (Files .isDirectory (path ));
17
29
}
18
30
}
You can’t perform that action at this time.
0 commit comments