public void testDeleteParallelFolder() throws IOException {
VirtualFile subpkg1 = createFolder(pkg1, "sub");
final VirtualFile subpkg2 = createFolder(pkg2, "sub");
addSourceFolder(content1, java1);
addSourceFolder(content2, java2);
assertOneParallelFolder(subpkg1, subpkg2);
cache.assertWasCalledAndClear();
assertOneParallelFolder(subpkg2, subpkg1);
cache.assertWasCalledAndClear();
ApplicationManager.getApplication().runWriteAction(new Runnable() {
public void run() {
try {
subpkg2.delete(null);
} catch (IOException e) {
throw new IllegalStateException(e);
}
}
});
assertNoParallelFolders(subpkg1);
cache.assertWasCalledAndClear();
assertNoParallelFolders(subpkg1);
cache.assertWasNotCalled();
}