public static void PushDirectory(IPatternContext context, params string[] directoryNames)
 {
     foreach (var each in directoryNames)
     {
         var directory = new MockDirectoryInfo(null, null, string.Empty, each, null);
         context.PushDirectory(directory);
     }
 }
        public FileSystemGlobbingTestContext Files(params string[] files)
        {
            _directoryInfo = new MockDirectoryInfo(
                _directoryInfo.Recorder,
                _directoryInfo.ParentDirectory,
                _directoryInfo.FullName,
                _directoryInfo.Name,
                _directoryInfo.Paths.Concat(files.Select(file => _basePath + file)).ToArray());

            return this;
        }
        public FileSystemGlobbingTestContext(string basePath, Matcher matcher)
        {
            _basePath = basePath;
            _recorder = new FileSystemOperationRecorder();
            _patternMatching = matcher;

            _directoryInfo = new MockDirectoryInfo(
                recorder: _recorder,
                parentDirectory: null,
                fullName: _basePath,
                name: ".",
                paths: new string[0]);
        }
 public FileSystemGlobbingTestContext SubDirectory(string name)
 {
     _directoryInfo = (MockDirectoryInfo)_directoryInfo.GetDirectory(name);
     return this;
 }
 public FileSystemGlobbingTestContext SubDirectory(string name)
 {
     _directoryInfo = (MockDirectoryInfo)_directoryInfo.GetDirectory(name);
     return(this);
 }