public void TestFindAllFilesOnlyDirectorySearchOk(string relFilePath, params string[] expectedFiles) { //SETUP var searcher = new RelPathSearcher(B4BSetupHelper.GetActualFilePathFromVirtualPath()); //ATTEMPT var foundFiles = searcher.FindAllFiles(relFilePath); //VERIFY CollectionAssert.AreEqual(expectedFiles, foundFiles); }
public void TestFindAllFilesBadDirSearchOk(string relFilePath, string expectedMessage) { //SETUP var searcher = new RelPathSearcher(B4BSetupHelper.GetActualFilePathFromVirtualPath()); string errorMessage = null; //ATTEMPT var foundFiles = searcher.FindAllFiles(relFilePath, s => errorMessage = s); //VERIFY foundFiles.Count().ShouldEqual(0); errorMessage.ShouldEqual(expectedMessage); }