forked from Wox-launcher/Wox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQueryTest.cs
More file actions
33 lines (29 loc) · 1.04 KB
/
QueryTest.cs
File metadata and controls
33 lines (29 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using NUnit.Framework;
using Wox.Core.Plugin;
using Wox.Plugin;
namespace Wox.Test
{
public class QueryTest
{
[Test]
[Ignore("Current query is tightly integrated with GUI, can't be tested.")]
public void ExclusivePluginQueryTest()
{
Query q = PluginManager.QueryInit("> file.txt file2 file3");
Assert.AreEqual(q.FirstSearch, "file.txt");
Assert.AreEqual(q.SecondSearch, "file2");
Assert.AreEqual(q.ThirdSearch, "file3");
Assert.AreEqual(q.SecondToEndSearch, "file2 file3");
}
[Test]
[Ignore("Current query is tightly integrated with GUI, can't be tested.")]
public void GenericPluginQueryTest()
{
Query q = PluginManager.QueryInit("file.txt file2 file3");
Assert.AreEqual(q.FirstSearch, "file.txt");
Assert.AreEqual(q.SecondSearch, "file2");
Assert.AreEqual(q.ThirdSearch, "file3");
Assert.AreEqual(q.SecondToEndSearch, "file2 file3");
}
}
}