PowerToys/Wox.Test/QueryTest.cs
2015-01-26 22:50:38 +08:00

38 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Wox.Core.Plugin;
using Wox.Plugin;
namespace Wox.Test
{
public class QueryTest
{
[Test]
public void UserPluginQueryTest()
{
Query q = new Query("f file.txt file2 file3");
q.Search = "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 SystemPluginQueryTest()
{
Query q = new Query("file.txt file2 file3");
q.Search = q.RawQuery;
Assert.AreEqual(q.FirstSearch, "file.txt");
Assert.AreEqual(q.SecondSearch, "file2");
Assert.AreEqual(q.ThirdSearch, "file3");
Assert.AreEqual(q.SecondToEndSearch, "file2 file3");
}
}
}