mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
Applying refactor to test project
For some strange reason, the using statements don't seem to want to work for the Message type. The full name has been used instead, but it's an ugly workaround for the time being.
This commit is contained in:
@@ -3,15 +3,15 @@
|
||||
// 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.ServiceHost.Protocol;
|
||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.SqlTools.EditorServices.Test.Protocol.MessageProtocol
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Test.Message
|
||||
{
|
||||
public class MessageReaderWriterTests
|
||||
{
|
||||
@@ -38,7 +38,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(ServiceLayer.ServiceHost.Protocol.Contracts.Message.Event("testEvent", null));
|
||||
outputStream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
string expectedHeaderString =
|
||||
@@ -82,7 +82,7 @@ namespace Microsoft.SqlTools.EditorServices.Test.Protocol.MessageProtocol
|
||||
inputStream.Flush();
|
||||
inputStream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
Message messageResult = messageReader.ReadMessage().Result;
|
||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message messageResult = messageReader.ReadMessage().Result;
|
||||
Assert.Equal("testEvent", messageResult.Method);
|
||||
|
||||
inputStream.Dispose();
|
||||
@@ -117,7 +117,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;
|
||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message messageResult = messageReader.ReadMessage().Result;
|
||||
Assert.Equal("testEvent", messageResult.Method);
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace Microsoft.SqlTools.EditorServices.Test.Protocol.MessageProtocol
|
||||
inputStream.Flush();
|
||||
inputStream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
Message messageResult = messageReader.ReadMessage().Result;
|
||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message messageResult = messageReader.ReadMessage().Result;
|
||||
Assert.Equal("testEvent", messageResult.Method);
|
||||
|
||||
inputStream.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user