From 21248a9e5e838d51ffb0d59efc768c235abee646 Mon Sep 17 00:00:00 2001 From: Thomas Lazar Date: Tue, 3 Jun 2014 12:27:11 +0200 Subject: [PATCH] Fixing Test --- Plugin.cs | 2 +- PluginTest.cs | 33 +++++++++++++++++---------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Plugin.cs b/Plugin.cs index d501254..b36b8cf 100644 --- a/Plugin.cs +++ b/Plugin.cs @@ -19,7 +19,7 @@ public List Query(Query query) List results = new List(); if (query.ActionParameters.Count != 0) - results.Add(MakeResult(query.ActionParameters[0], null)); + results.Add(MakeResult(query.ActionParameters[0], "")); results.Add(MakeResult(null, null)); diff --git a/PluginTest.cs b/PluginTest.cs index 96ffb10..29f86b9 100644 --- a/PluginTest.cs +++ b/PluginTest.cs @@ -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 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 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 +}