1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4 
5 using System.Linq;
6 using Xunit;
7 
8 namespace System.IO.Tests
9 {
10     public class DirectoryInfo_GetFileSystemInfos : Directory_GetFileSystemEntries_str
11     {
GetEntries(string path)12         public override string[] GetEntries(string path)
13         {
14             return ((new DirectoryInfo(path).GetFileSystemInfos().Select(x => x.FullName)).ToArray());
15         }
16     }
17 
18     public class DirectoryInfo_GetFileSystemInfos_str : Directory_GetFileSystemEntries_str_str
19     {
GetEntries(string path)20         public override string[] GetEntries(string path)
21         {
22             return ((new DirectoryInfo(path).GetFileSystemInfos("*").Select(x => x.FullName)).ToArray());
23         }
24 
GetEntries(string path, string searchPattern)25         public override string[] GetEntries(string path, string searchPattern)
26         {
27             return ((new DirectoryInfo(path).GetFileSystemInfos(searchPattern).Select(x => x.FullName)).ToArray());
28         }
29     }
30 
31     public class DirectoryInfo_GetFileSystemInfos_str_so : Directory_GetFileSystemEntries_str_str_so
32     {
GetEntries(string path)33         public override string[] GetEntries(string path)
34         {
35             return ((new DirectoryInfo(path).GetFileSystemInfos("*", SearchOption.TopDirectoryOnly).Select(x => x.FullName)).ToArray());
36         }
37 
GetEntries(string path, string searchPattern)38         public override string[] GetEntries(string path, string searchPattern)
39         {
40             return ((new DirectoryInfo(path).GetFileSystemInfos(searchPattern, SearchOption.TopDirectoryOnly).Select(x => x.FullName)).ToArray());
41         }
42 
GetEntries(string path, string searchPattern, SearchOption option)43         public override string[] GetEntries(string path, string searchPattern, SearchOption option)
44         {
45             return ((new DirectoryInfo(path).GetFileSystemInfos(searchPattern, option).Select(x => x.FullName)).ToArray());
46         }
47     }
48 }
49