public void ShouldLogDeletedEventToDebug() { System.IO.FileInfo fileInfo = new System.IO.FileInfo(GetType().Assembly.Location); FileSystemWatcher tested = new FileSystemWatcher(); MockLog log = new MockLog(tested); tested.OnDeleted(tested, new System.IO.FileSystemEventArgs(System.IO.WatcherChangeTypes.Created, fileInfo.Directory.FullName, fileInfo.Name)); Assert.IsTrue(log.Any(x => x.Level == MockLog.Level.Debug && x.Message.Contains(fileInfo.FullName))); }