mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
rename top level directory search method and tests to reflect intent
This commit is contained in:
parent
4eb2fe9297
commit
7629778610
2 changed files with 8 additions and 8 deletions
|
|
@ -141,13 +141,13 @@ namespace Flow.Launcher.Test.Plugins
|
|||
}
|
||||
|
||||
[TestCase]
|
||||
public void GivenWindowsIndexSearch_WhenReturnedZeroResultsAndIsNotIndexed_ThenSearchMethodShouldContinueDirectoryInfoClassSearch()
|
||||
public void GivenTopLevelDirectorySearch_WhenIndexSearchNotRequired_ThenSearchMethodShouldContinueDirectoryInfoClassSearch()
|
||||
{
|
||||
// Given
|
||||
var searchManager = new SearchManager(new Settings(), new PluginInitContext());
|
||||
|
||||
// When
|
||||
var results = searchManager.TopLevelFolderSearchBehaviour(
|
||||
var results = searchManager.TopLevelDirectorySearchBehaviour(
|
||||
MethodWindowsIndexSearchReturnsZeroResults,
|
||||
MethodDirectoryInfoClassSearchReturnsTwoResults,
|
||||
false,
|
||||
|
|
@ -161,13 +161,13 @@ namespace Flow.Launcher.Test.Plugins
|
|||
}
|
||||
|
||||
[TestCase]
|
||||
public void GivenWindowsIndexSearch_WhenReturnedZeroResultsAndIsIndexed_ThenSearchMethodShouldNotContinueDirectoryInfoClassSearch()
|
||||
public void GivenTopLevelDirectorySearch_WhenIndexSearchNotRequired_ThenSearchMethodShouldNotContinueDirectoryInfoClassSearch()
|
||||
{
|
||||
// Given
|
||||
var searchManager = new SearchManager(new Settings(), new PluginInitContext());
|
||||
|
||||
// When
|
||||
var results = searchManager.TopLevelFolderSearchBehaviour(
|
||||
var results = searchManager.TopLevelDirectorySearchBehaviour(
|
||||
MethodWindowsIndexSearchReturnsZeroResults,
|
||||
MethodDirectoryInfoClassSearchReturnsTwoResults,
|
||||
true,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using Flow.Launcher.Plugin.Explorer.Search.DirectoryInfo;
|
||||
using Flow.Launcher.Plugin.Explorer.Search.DirectoryInfo;
|
||||
using Flow.Launcher.Plugin.Explorer.Search.QuickFolderLinks;
|
||||
using Flow.Launcher.Plugin.Explorer.Search.WindowsIndex;
|
||||
using Flow.Launcher.Plugin.SharedCommands;
|
||||
|
|
@ -57,8 +57,8 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
|
||||
results.Add(ResultManager.CreateOpenCurrentFolderResult(locationPath, indexExists));
|
||||
|
||||
results.AddRange(TopLevelFolderSearchBehaviour(WindowsIndexTopLevelFolderSearch,
|
||||
DirectoryInfoClassSearch,
|
||||
results.AddRange(TopLevelDirectorySearchBehaviour(WindowsIndexTopLevelFolderSearch,
|
||||
DirectoryInfoClassSearch,
|
||||
indexExists,
|
||||
query,
|
||||
locationPath));
|
||||
|
|
@ -73,7 +73,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
return directoryInfoSearch.TopLevelDirectorySearch(query, querySearch);
|
||||
}
|
||||
|
||||
public List<Result> TopLevelFolderSearchBehaviour(
|
||||
public List<Result> TopLevelDirectorySearchBehaviour(
|
||||
Func<Query, string, List<Result>> windowsIndexSearch,
|
||||
Func<Query, string, List<Result>> directoryInfoClassSearch,
|
||||
bool indexExists,
|
||||
|
|
|
|||
Loading…
Reference in a new issue