Skip to content

Commit

Permalink
Additional virtual file object test
Browse files Browse the repository at this point in the history
  • Loading branch information
jlahoda authored and Jaroslav Tulach committed Apr 22, 2021
1 parent a61bd21 commit e450db5
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1781,6 +1781,14 @@ public void run() {
}
}

public void testVirtualFOs() throws IOException {
final FileObject wd = FileBasedFileSystem.getFileObject(getWorkDir());
FileObject nonExisting = wd.getFileObject("non-existing-folder/non-existing-folder/non-existing-child.xyz", false);
assertFalse(nonExisting.isValid());
assertFalse(nonExisting.getParent().isValid());
assertFalse(nonExisting.getParent().getParent().isValid());
}

private class EventsEvaluator extends FileChangeAdapter {
private int folderCreatedCount;
private int dataCreatedCount;
Expand Down

0 comments on commit e450db5

Please sign in to comment.