GetFilesAndFoldersFromDrive() public méthode

public GetFilesAndFoldersFromDrive ( string searchPath, List queryCollection, char directorySeparatorChar ) : List
searchPath string
queryCollection List
directorySeparatorChar char
Résultat List
        public void FileSystemQuery_GetFilesAndFoldersFromDrive_ValidSearchPath_ExpectValues()
        {
            //------------Setup for test--------------------------
            var dir = new Mock<IDirectory>();
            dir.Setup(a => a.GetFileSystemEntries(It.IsAny<string>())).Returns(new[] { "a", "b", "c" });
            dir.Setup(a => a.Exists(It.IsAny<string>())).Returns(true);
            var query = new FileSystemQuery(dir.Object, new DirectoryEntryFactory(), new ShareCollectionFactory());
            var files = new List<string>();

            files= query.GetFilesAndFoldersFromDrive(@"c:\bob", files, 'o');
            //------------Assert Results-------------------------

            Assert.AreEqual(files.Count, 3);
            Assert.AreEqual("a", files[0]);
            Assert.AreEqual("b", files[1]);
            Assert.AreEqual("c", files[2]);
        }