verifyNoMoreInteractions(listener);
}
+ public void testFileModificationTimeChanged() throws InterruptedException {
+ data.createFile(FILE1, "hello");
+ monitor.poll();
+ reset(listener);
+ data.deleteFile(FILE1);
+ Thread.sleep(2000);
+ data.createFile(FILE1, "hello");
+
+ monitor.poll();
+ verify(listener).fileChanged(data.getFile(FILE1));
+ verifyNoMoreInteractions(listener);
+ }
+
public void testFileFilterIsUsed() {
monitor.poll();
monitor.poll();
data.createFile(FILE1, "hello");
- stubVoid(listener).toThrow(new RuntimeException()).on().fileCreated(
- data.getFile(FILE1));
+ stubVoid(listener).toThrow(new RuntimeException()).on()
+ .fileCreated(data.getFile(FILE1));
try {
monitor.poll();