Skip to content

Commit

Permalink
Fixing Test
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslazar committed Jun 3, 2014
1 parent 633318b commit 21248a9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public List<Result> Query(Query query)
List<Result> results = new List<Result>();

if (query.ActionParameters.Count != 0)
results.Add(MakeResult(query.ActionParameters[0], null));
results.Add(MakeResult(query.ActionParameters[0], ""));

results.Add(MakeResult(null, null));

Expand Down
33 changes: 17 additions & 16 deletions PluginTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
using System.Collections.Generic;
using NUnit.Framework;

namespace Wox.Plugin.Rdp {
[TestFixture]
public class PluginTest {
[Test]
public void TestQuery() {
Assert.AreEqual(18, new PuttyPlugin().Query(new Query("pt")).Count);
Assert.AreEqual(3, new PuttyPlugin().Query(new Query("pt tel")).Count);
Assert.AreEqual(1, new PuttyPlugin().Query(new Query("pt we123")).Count);
List<Result> res = new PuttyPlugin().Query(new Query("pt tel"));
foreach (Result r in res) {
Console.Out.WriteLine(r);
}
}
}
// end namespace
}
namespace Wox.Plugin.Rdp {
[TestFixture]
public class PluginTest {
[Test]
public void TestQuery() {
Assert.AreEqual(1, new PuttyPlugin().Query(new Query("rdp")).Count);
Assert.AreEqual(2, new PuttyPlugin().Query(new Query("rdp remotehost")).Count);

List<Result> res = new PuttyPlugin().Query(new Query("rdp remotehost"));
Console.WriteLine("Results for: rdp remotehost");
foreach (Result r in res) {
Console.Out.WriteLine("Title: {0} Subtitle: {1}", r.Title, r.SubTitle);
}
}
}
// end namespace
}

0 comments on commit 21248a9

Please sign in to comment.