}
public void searchMarkUpdated(Set<SearchMarkEvent> events) {
searchMarkUpdateEventOccurred[0] = true;
assertEquals(1, events.size());
SearchMarkEvent event = events.iterator().next();
assertEquals(searchMark, event.getEntity());
assertTrue("Expected this Event to be Root Event", event.isRoot());
assertEquals(oldParent, event.getOldParent());
assertEquals(newParent, event.getEntity().getFolder());
}
};
final boolean[] folderUpdateEventOccurred = new boolean[1];
folderListener = new FolderListener() {
public void folderAdded(Set<FolderEvent> events) {
fail("Unexpected event");
}
public void folderDeleted(Set<FolderEvent> events) {
fail("Unexpected event");
}
public void folderUpdated(Set<FolderEvent> events) {
folderUpdateEventOccurred[0] = true;
assertEquals(3, events.size());
for (FolderEvent event : events) {
assertFalse("Expected this Event to be NO Root Event", event.isRoot());
}
}
};
fModel.addFolderListener(folderListener);
fModel.addBookMarkListener(bookMarkListener);