public void TestThatCalculateIntervalAlwaysReturnsPositiveNumbers() { using (var underTest = new HandlerMockWithoutTimerAction(this.queue.Object, this.storage.Object, this.fsFactory.Object)) { this.fsFactory.Setup(f => f.IsDirectory(this.path)).Returns((bool?)null); var file = this.fsFactory.AddFile(this.path, false); this.storage.AddLocalFile(file.Object.FullName, "id", Guid.NewGuid()); underTest.Handle(null, new FileSystemEventArgs(WatcherChangeTypes.Deleted, Directory, Name)); System.Threading.Thread.Sleep(20); underTest.Handle(null, new FileSystemEventArgs(WatcherChangeTypes.Deleted, Directory, Name)); // negativ numbers lead to ArgumentException so this would break here } }