public GetFileEntries ( string path, string searchPattern ) : string[] | ||
path | string | |
searchPattern | string | |
Résultat | string[] |
public void GetFilesShouldReturnFilesInRoot() { //Given var dir = new ZipArchiveDirectory("Fresh.zip"); //when string[] files = dir.GetFileEntries(".", "*"); //then Assert.That(files.Length, Is.EqualTo(2)); Assert.That(files[1], Is.EqualTo(FullPath("file1.txt"))); }
public void GetFilesShouldReturnFilesInNestedDirectory() { //given var dir = new ZipArchiveDirectory("Fresh.zip"); //when string[] files = dir.GetFileEntries("Fresh", "*"); //then Assert.That(files.Length, Is.EqualTo(4)); Assert.That(files[files.Length - 1], Is.EqualTo(FullPath("Fresh/README.txt"))); }