Merge branch 'dev' into dev_langservice

This commit is contained in:
Karl Burtram
2016-07-25 17:51:23 -07:00
72 changed files with 1255 additions and 463 deletions

View File

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
using Microsoft.SqlTools.Test.Utility;
using Xunit;
namespace Microsoft.SqlTools.Test.Connection
namespace Microsoft.SqlTools.ServiceLayer.Test.Connection
{
/// <summary>
/// Tests for the ServiceHost Connection Service tests

View File

@@ -3,14 +3,12 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.EditorServices;
using Microsoft.SqlTools.EditorServices.Session;
using Microsoft.SqlTools.LanguageSupport;
using Microsoft.SqlTools.Test.Connection;
using Microsoft.SqlTools.ServiceLayer.LanguageServices;
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
using Microsoft.SqlTools.Test.Utility;
using Xunit;
namespace Microsoft.SqlTools.Test.LanguageServer
namespace Microsoft.SqlTools.ServiceLayer.Test.LanguageServer
{
/// <summary>
/// Tests for the ServiceHost Language Service tests

View File

@@ -3,15 +3,16 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol;
using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Serializers;
using System;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
using HostingMessage = Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.Message;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
using Xunit;
namespace Microsoft.SqlTools.EditorServices.Test.Protocol.MessageProtocol
namespace Microsoft.SqlTools.ServiceLayer.Test.Message
{
public class MessageReaderWriterTests
{
@@ -38,7 +39,7 @@ namespace Microsoft.SqlTools.EditorServices.Test.Protocol.MessageProtocol
// Write the message and then roll back the stream to be read
// TODO: This will need to be redone!
await messageWriter.WriteMessage(Message.Event("testEvent", null));
await messageWriter.WriteMessage(HostingMessage.Event("testEvent", null));
outputStream.Seek(0, SeekOrigin.Begin);
string expectedHeaderString =
@@ -82,7 +83,7 @@ namespace Microsoft.SqlTools.EditorServices.Test.Protocol.MessageProtocol
inputStream.Flush();
inputStream.Seek(0, SeekOrigin.Begin);
Message messageResult = messageReader.ReadMessage().Result;
HostingMessage messageResult = messageReader.ReadMessage().Result;
Assert.Equal("testEvent", messageResult.Method);
inputStream.Dispose();
@@ -117,7 +118,7 @@ namespace Microsoft.SqlTools.EditorServices.Test.Protocol.MessageProtocol
// Read the written messages from the stream
for (int i = 0; i < overflowMessageCount; i++)
{
Message messageResult = messageReader.ReadMessage().Result;
HostingMessage messageResult = messageReader.ReadMessage().Result;
Assert.Equal("testEvent", messageResult.Method);
}
@@ -145,7 +146,7 @@ namespace Microsoft.SqlTools.EditorServices.Test.Protocol.MessageProtocol
inputStream.Flush();
inputStream.Seek(0, SeekOrigin.Begin);
Message messageResult = messageReader.ReadMessage().Result;
HostingMessage messageResult = messageReader.ReadMessage().Result;
Assert.Equal("testEvent", messageResult.Method);
inputStream.Dispose();

View File

@@ -3,19 +3,16 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol;
using System;
using System.Threading.Tasks;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
namespace Microsoft.SqlTools.EditorServices.Test.Protocol.MessageProtocol
namespace Microsoft.SqlTools.ServiceLayer.Test.Message
{
#region Request Types
internal class TestRequest
{
public Task ProcessMessage(
EditorSession editorSession,
MessageWriter messageWriter)
public Task ProcessMessage(MessageWriter messageWriter)
{
return Task.FromResult(false);
}

View File

@@ -7,7 +7,7 @@
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>2d771d16-9d85-4053-9f79-e2034737deef</ProjectGuid>
<RootNamespace>Microsoft.SqlTools.EditorServices.Test.Protocol</RootNamespace>
<RootNamespace>Microsoft.SqlTools.ServiceLayer.Test</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'==''">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
@@ -15,5 +15,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

View File

@@ -3,12 +3,12 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol;
using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Serializers;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
using HostingMessage = Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.Message;
using Newtonsoft.Json.Linq;
using Xunit;
namespace Microsoft.SqlTools.EditorServices.Test.Protocol.LanguageServer
namespace Microsoft.SqlTools.ServiceLayer.Test.ServiceHost
{
public class TestMessageContents
{
@@ -44,7 +44,7 @@ namespace Microsoft.SqlTools.EditorServices.Test.Protocol.LanguageServer
{
var messageObj =
this.messageSerializer.SerializeMessage(
Message.Request(
HostingMessage.Request(
MessageId,
MethodName,
MessageContent));
@@ -61,7 +61,7 @@ namespace Microsoft.SqlTools.EditorServices.Test.Protocol.LanguageServer
{
var messageObj =
this.messageSerializer.SerializeMessage(
Message.Event(
HostingMessage.Event(
MethodName,
MessageContent));
@@ -76,7 +76,7 @@ namespace Microsoft.SqlTools.EditorServices.Test.Protocol.LanguageServer
{
var messageObj =
this.messageSerializer.SerializeMessage(
Message.Response(
HostingMessage.Response(
MessageId,
null,
MessageContent));
@@ -92,7 +92,7 @@ namespace Microsoft.SqlTools.EditorServices.Test.Protocol.LanguageServer
{
var messageObj =
this.messageSerializer.SerializeMessage(
Message.ResponseError(
HostingMessage.ResponseError(
MessageId,
null,
MessageContent));

View File

@@ -7,9 +7,9 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.SqlTools.EditorServices.Connection;
using Microsoft.SqlTools.EditorServices.Session;
using Microsoft.SqlTools.LanguageSupport;
using Microsoft.SqlTools.ServiceLayer.Connection;
using Microsoft.SqlTools.ServiceLayer.LanguageServices;
using Microsoft.SqlTools.ServiceLayer.SqlContext;
using Xunit;
namespace Microsoft.SqlTools.Test.Utility