mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-29 22:32:59 +00:00 
			
		
		
		
	Add more tests for FilePathUtils.isValidDirectoryPath for better coverage
This commit is contained in:
		| @@ -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())); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alireza Tofighi
					Alireza Tofighi