public void WaitForFile_WaitForExistingFile_ReportFileFound() { //Arrange var logger = new TestReportLogger(); Report.AttachLogger(logger); var pattern = "TextFile*"; //Act FileLibrary.WaitForFile(testFilesDirPath, pattern, 500, 100); //Assert Report.DetachLogger(logger); Assert.AreEqual( string.Format("File with pattern '{0}' was found in directory '{1}'.", pattern, testFilesDirPath), logger.LastLogMessage); }