コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }