Exemple #1
0
        public void GetSearchFrame_FileItem()
        {
            ISearchFrame searchFrame = _actionRegistry.GetSearchFrame(new IIndexable[] { new FileItem(Assembly.GetExecutingAssembly().Location) });

            var indexableSearchFrame = searchFrame.ShouldBeType <IndexableSearchFrame>();

            indexableSearchFrame.Indexables.Length.ShouldEqual(2);
            indexableSearchFrame.Indexables.OfType <ContainingFolderConverter>().Count().ShouldEqual(1);
        }
Exemple #2
0
        private bool PushStack()
        {
            if (!_mainListModel.Items.Any())
            {
                return(false);
            }

            SearchItemModel searchItemModel = _mainListModel.Items[_mainListModel.SelectedIndex];
            ISearchFrame    searchFrame     = _actionRegistry.GetSearchFrame(_selectedIndexables.Reverse().Concat(new[] { searchItemModel.TargetItem }).ToArray());

            if (searchFrame == null)
            {
                return(false);
            }

            _stack.Push(searchFrame);
            _selectedIndexables.Push(searchItemModel.TargetItem);
            StackPushed?.Invoke();
            return(true);
        }
Exemple #3
0
        public void GetSearchFrame_GoogleAction()
        {
            ISearchFrame searchFrame = _actionRegistry.GetSearchFrame(new IIndexable[] { new GoogleAction() });

            searchFrame.ShouldBeType <StringSearchFrame>();
        }