@Test public void fileRenameTest() { SnapshotInfo info = new SnapshotInfo("testProject", relPath + "a", relPath, fullPath + "a", fullPath, ChangeType.FILE_RENAME); taker.execute(info); int i = 0; while (event == null) { if (i > 400) { fail("LoggableEvent is null after waiting over 2000ms"); } i++; try { Thread.sleep(5); } catch (InterruptedException e) { } } assertEquals(event.getCourseName(), "course1"); }
public void execute(SnapshotInfo info) { this.info = info; if (info.getChangeType() == ChangeType.FILE_RENAME || info.getChangeType() == ChangeType.FOLDER_RENAME) { handleRename(); } else { handleChange(); } }
SnapshotTaker { public void execute(SnapshotInfo info) { this.info = info; if (info.getChangeType() == ChangeType.FILE_RENAME || info.getChangeType() == ChangeType.FOLDER_RENAME) { handleRename(); } else { handleChange(); } } }
SnapshotTaker { public void execute(SnapshotInfo info) { this.info = info; if (info.getChangeType() == ChangeType.FILE_RENAME || info.getChangeType() == ChangeType.FOLDER_RENAME) { handleRename(); } else { handleChange(); } } SnapshotTaker(ActiveThreadSet threadSet, EventReceiver receiver, Settings settings, ProjectDAO projectDAO); }
SnapshotTaker { public void execute(SnapshotInfo info) { this.info = info; if (info.getChangeType() == ChangeType.FILE_RENAME || info.getChangeType() == ChangeType.FOLDER_RENAME) { handleRename(); } else { handleChange(); } } SnapshotTaker(ActiveThreadSet threadSet, EventReceiver receiver, Settings settings, ProjectDAO projectDAO); void execute(SnapshotInfo info); }
SnapshotTaker { public void execute(SnapshotInfo info) { this.info = info; if (info.getChangeType() == ChangeType.FILE_RENAME || info.getChangeType() == ChangeType.FOLDER_RENAME) { handleRename(); } else { handleChange(); } } SnapshotTaker(ActiveThreadSet threadSet, EventReceiver receiver, Settings settings, ProjectDAO projectDAO); void execute(SnapshotInfo info);  }