mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-12 05:19:13 +01:00
Add more tests for FilePathUtils.isValidDirectoryPath for better coverage
This commit is contained in:
parent
92ab9cae27
commit
067528211f
@ -12,6 +12,12 @@ import static org.junit.Assert.assertTrue;
|
||||
public class FilePathHelperTest {
|
||||
@Test
|
||||
public void testIsValidDirectoryPath() throws IOException {
|
||||
// empty path is not valid
|
||||
assertFalse(FilePathUtils.isValidDirectoryPath(""));
|
||||
|
||||
// null path is not valid
|
||||
assertFalse(FilePathUtils.isValidDirectoryPath(null));
|
||||
|
||||
// path that exists
|
||||
final File dir1 = Files.createTempDirectory("dir1").toFile();
|
||||
assertTrue(FilePathUtils.isValidDirectoryPath(dir1.getAbsolutePath()));
|
||||
|
Loading…
Reference in New Issue
Block a user