mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Update QueryBuilder tests for new nonGlobalPlugins type
Refactored QueryBuilderTest.cs to use Dictionary<string, List<PluginPair>> for nonGlobalPlugins, updating test cases to use lists of PluginPair. Also replaced empty dictionary instantiation with shorthand [] where appropriate.
This commit is contained in:
parent
4537013cde
commit
17d675e5ce
1 changed files with 5 additions and 5 deletions
|
|
@ -11,9 +11,9 @@ namespace Flow.Launcher.Test
|
|||
[Test]
|
||||
public void ExclusivePluginQueryTest()
|
||||
{
|
||||
var nonGlobalPlugins = new Dictionary<string, PluginPair>
|
||||
var nonGlobalPlugins = new Dictionary<string, List<PluginPair>>
|
||||
{
|
||||
{">", new PluginPair {Metadata = new PluginMetadata {ActionKeywords = new List<string> {">"}}}}
|
||||
{ ">", new List<PluginPair>(){ new() { Metadata = new PluginMetadata { ActionKeywords = [">"] } } } }
|
||||
};
|
||||
|
||||
Query q = QueryBuilder.Build("> ping google.com -n 20 -6", "> ping google.com -n 20 -6", nonGlobalPlugins);
|
||||
|
|
@ -34,9 +34,9 @@ namespace Flow.Launcher.Test
|
|||
[Test]
|
||||
public void ExclusivePluginQueryIgnoreDisabledTest()
|
||||
{
|
||||
var nonGlobalPlugins = new Dictionary<string, PluginPair>
|
||||
var nonGlobalPlugins = new Dictionary<string, List<PluginPair>>
|
||||
{
|
||||
{">", new PluginPair {Metadata = new PluginMetadata {ActionKeywords = new List<string> {">"}, Disabled = true}}}
|
||||
{ ">", new List<PluginPair>(){ new() { Metadata = new PluginMetadata { ActionKeywords = [">"] } } } }
|
||||
};
|
||||
|
||||
Query q = QueryBuilder.Build("> ping google.com -n 20 -6", "> ping google.com -n 20 -6", nonGlobalPlugins);
|
||||
|
|
@ -51,7 +51,7 @@ namespace Flow.Launcher.Test
|
|||
[Test]
|
||||
public void GenericPluginQueryTest()
|
||||
{
|
||||
Query q = QueryBuilder.Build("file.txt file2 file3", "file.txt file2 file3", new Dictionary<string, PluginPair>());
|
||||
Query q = QueryBuilder.Build("file.txt file2 file3", "file.txt file2 file3", []);
|
||||
|
||||
ClassicAssert.AreEqual("file.txt file2 file3", q.Search);
|
||||
ClassicAssert.AreEqual("", q.ActionKeyword);
|
||||
|
|
|
|||
Loading…
Reference in a new issue