Test driver improvements (#117)

* Refactored the test driver to work with xunit in addition to the command line

* Fix behavior of property
This commit is contained in:
Mitchell Sternke
2016-10-25 17:16:33 -07:00
committed by GitHub
parent cac3ae5eeb
commit 67d1d800a3
9 changed files with 241 additions and 66 deletions

View File

@@ -163,8 +163,14 @@ namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
TParams typedParams = default(TParams);
if (eventMessage.Contents != null)
{
// TODO: Catch parse errors!
typedParams = eventMessage.Contents.ToObject<TParams>();
try
{
typedParams = eventMessage.Contents.ToObject<TParams>();
}
catch (Exception ex)
{
Logger.Write(LogLevel.Verbose, ex.ToString());
}
}
return eventHandler(typedParams, eventContext);