PowerToys/Wox.Test/QueryTest.cs
2015-11-03 05:09:54 +00:00

32 lines
895 B
C#

using NUnit.Framework;
using Wox.Core.Plugin;
using Wox.Plugin;
namespace Wox.Test
{
public class QueryTest
{
[Test]
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]
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");
}
}
}