Flow.Launcher/Wox.Test/QueryTest.cs

34 lines
1 KiB
C#
Raw Normal View History

2015-10-30 23:17:34 +00:00
using NUnit.Framework;
2015-11-03 05:09:54 +00:00
using Wox.Core.Plugin;
2014-01-29 10:33:24 +00:00
using Wox.Plugin;
2013-12-19 15:51:20 +00:00
2014-01-29 10:33:24 +00:00
namespace Wox.Test
2013-12-19 15:51:20 +00:00
{
public class QueryTest
{
[Test]
[Ignore("Current query is tightly integrated with GUI, can't be tested.")]
2015-02-05 14:20:42 +00:00
public void ExclusivePluginQueryTest()
2013-12-19 15:51:20 +00:00
{
2015-11-03 05:09:54 +00:00
Query q = PluginManager.QueryInit("> file.txt file2 file3");
2013-12-19 15:51:20 +00:00
Assert.AreEqual(q.FirstSearch, "file.txt");
Assert.AreEqual(q.SecondSearch, "file2");
Assert.AreEqual(q.ThirdSearch, "file3");
Assert.AreEqual(q.SecondToEndSearch, "file2 file3");
}
2013-12-19 15:51:20 +00:00
[Test]
[Ignore("Current query is tightly integrated with GUI, can't be tested.")]
2015-02-05 14:20:42 +00:00
public void GenericPluginQueryTest()
{
2015-11-03 05:09:54 +00:00
Query q = PluginManager.QueryInit("file.txt file2 file3");
2014-02-28 15:21:01 +00:00
Assert.AreEqual(q.FirstSearch, "file.txt");
Assert.AreEqual(q.SecondSearch, "file2");
Assert.AreEqual(q.ThirdSearch, "file3");
Assert.AreEqual(q.SecondToEndSearch, "file2 file3");
2013-12-19 15:51:20 +00:00
}
}
}