feat(file-cleaner): added unit tests
This commit is contained in:
parent
97c6d13971
commit
47986b4bc0
|
@ -0,0 +1,4 @@
|
||||||
|
package de.begerad.fileagerm;
|
||||||
|
|
||||||
|
public class TestFileCleaner {
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package de.begerad.fileagerm;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
public class TestFileExplorer {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEmptyListFiles() {
|
||||||
|
File[] files = FileExplorer.listFiles("/mnt");
|
||||||
|
assertTrue(files.length == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testNullListFiles() {
|
||||||
|
assertNull(FileExplorer.listFiles("/etc/hosts"));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue