* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- */
+ */
package org.wamblee.io;
import static org.mockito.Mockito.*;
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();