-
Bug
-
Resolution: Done
-
Major
-
None
-
None
This test shows the failing case:
/**
- Ensures that
{@link VirtualFile#isDirectory()}
returns false for files
- that do not exist
*/
@Test
public void nonExistentFilesAreNotDirectory() throws Exception { // Create and mount an archive final JavaArchive archive = ShrinkWrap.create(NAME_ARCHIVE, JavaArchive.class); final VirtualFile virtualFile = this.createAndMountArchive(archive); // Control final VirtualFile doesNotExistFile = virtualFile.getChild("doesnotexist"); Assert .assertFalse("Test should indicate that this file does not exist (control test)", doesNotExistFile.exists()); // Ensure file that doesn't exist does not report as directory Assert.assertFalse("File that doesn't exist should not report as a directory", doesNotExistFile.isDirectory()); }