private void OpenInExplorer()
        {
            var dataSources = _dataSource.OriginalSources.GroupBy(GetDirectory);

            foreach (var grouping in dataSources)
            {
                var files  = grouping.Select(x => x.FullFileName).ToArray();
                var action = new OpenFolderAction(files, grouping.Key, new FileExplorer());
                _actionCenter.Add(action);
            }
        }
예제 #2
0
        public void TestOpenFolder()
        {
            var fileExplorer = new Mock <IFileExplorer>();

            fileExplorer.Setup(f => f.SelectFile(It.IsAny <string>()))
            .Throws <DirectoryNotFoundException>();

            var openFolderAction = new OpenFolderAction("unknown directory", fileExplorer.Object);

            openFolderAction.Property(x => x.Progress).ShouldEventually().Be(Percentage.HundredPercent);
        }
        private void OpenInExplorer()
        {
            var action = new OpenFolderAction(FullName, new FileExplorer());

            _actionCenter.Add(action);
        }