mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
for unit tetsing
This commit is contained in:
@@ -135,7 +135,7 @@ namespace Wox.Core.Plugin
|
|||||||
var rawQuery = string.Join(Query.TermSeperater, terms);
|
var rawQuery = string.Join(Query.TermSeperater, terms);
|
||||||
var actionKeyword = string.Empty;
|
var actionKeyword = string.Empty;
|
||||||
var search = rawQuery;
|
var search = rawQuery;
|
||||||
List<string> actionParameters = terms.ToList();
|
var actionParameters = terms.ToList();
|
||||||
if (terms.Length == 0) return null;
|
if (terms.Length == 0) return null;
|
||||||
if (NonGlobalPlugins.ContainsKey(terms[0]) &&
|
if (NonGlobalPlugins.ContainsKey(terms[0]) &&
|
||||||
!Settings.Plugins[NonGlobalPlugins[terms[0]].Metadata.ID].Disabled)
|
!Settings.Plugins[NonGlobalPlugins[terms[0]].Metadata.ID].Disabled)
|
||||||
|
|||||||
@@ -6,6 +6,19 @@ namespace Wox.Plugin
|
|||||||
{
|
{
|
||||||
public class Query
|
public class Query
|
||||||
{
|
{
|
||||||
|
internal Query() { }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// to allow unit tests for plug ins
|
||||||
|
/// </summary>
|
||||||
|
public Query(string rawQuery, string search, string[] terms, string actionKeyword = null)
|
||||||
|
{
|
||||||
|
Search = search;
|
||||||
|
RawQuery = rawQuery;
|
||||||
|
Terms = terms;
|
||||||
|
ActionKeyword = actionKeyword;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Raw query, this includes action keyword if it has
|
/// Raw query, this includes action keyword if it has
|
||||||
/// We didn't recommend use this property directly. You should always use Search property.
|
/// We didn't recommend use this property directly. You should always use Search property.
|
||||||
|
|||||||
Reference in New Issue
Block a user