diff --git a/Wox.Core/Plugin/PluginManager.cs b/Wox.Core/Plugin/PluginManager.cs index e42cf02e80..d6806e5cb2 100644 --- a/Wox.Core/Plugin/PluginManager.cs +++ b/Wox.Core/Plugin/PluginManager.cs @@ -135,7 +135,7 @@ namespace Wox.Core.Plugin var rawQuery = string.Join(Query.TermSeperater, terms); var actionKeyword = string.Empty; var search = rawQuery; - List actionParameters = terms.ToList(); + var actionParameters = terms.ToList(); if (terms.Length == 0) return null; if (NonGlobalPlugins.ContainsKey(terms[0]) && !Settings.Plugins[NonGlobalPlugins[terms[0]].Metadata.ID].Disabled) diff --git a/Wox.Plugin/Query.cs b/Wox.Plugin/Query.cs index 400ae741f1..4289f0497d 100644 --- a/Wox.Plugin/Query.cs +++ b/Wox.Plugin/Query.cs @@ -6,6 +6,19 @@ namespace Wox.Plugin { public class Query { + internal Query() { } + + /// + /// to allow unit tests for plug ins + /// + public Query(string rawQuery, string search, string[] terms, string actionKeyword = null) + { + Search = search; + RawQuery = rawQuery; + Terms = terms; + ActionKeyword = actionKeyword; + } + /// /// Raw query, this includes action keyword if it has /// We didn't recommend use this property directly. You should always use Search property.