New test common project for database connections using the settings.json (#210)

* moved test driver tests and test common classes to separate projects
This commit is contained in:
Leila Lali
2017-01-11 13:47:56 -08:00
committed by GitHub
parent e71bcefb28
commit b353b2137e
56 changed files with 1396 additions and 1008 deletions

View File

@@ -65,7 +65,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.LanguageServices
// set up file for returning the query
scriptFile = new Mock<ScriptFile>();
scriptFile.SetupGet(file => file.Contents).Returns(Common.StandardQuery);
scriptFile.SetupGet(file => file.Contents).Returns(QueryExecution.Common.StandardQuery);
scriptFile.SetupGet(file => file.ClientFilePath).Returns(this.testScriptUri);
// set up workspace mock

View File

@@ -27,6 +27,7 @@ using Microsoft.SqlTools.Test.Utility;
using Moq;
using Xunit;
using Location = Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Location;
using Microsoft.SqlTools.ServiceLayer.Test.Common;
namespace Microsoft.SqlTools.ServiceLayer.Test.LanguageServices
{
@@ -71,7 +72,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.LanguageServices
// set up file for returning the query
var fileMock = new Mock<ScriptFile>();
fileMock.SetupGet(file => file.Contents).Returns(Common.StandardQuery);
fileMock.SetupGet(file => file.Contents).Returns(QueryExecution.Common.StandardQuery);
fileMock.SetupGet(file => file.ClientFilePath).Returns(this.testScriptUri);
// set up workspace mock
@@ -125,7 +126,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.LanguageServices
[Fact]
public async Task DefinitionsHandlerWithNoConnectionTest()
{
TestObjects.InitializeTestServices();
TestServiceProvider.InitializeTestServices();
InitializeTestObjects();
// request definition
var definitionTask = await Task.WhenAny(LanguageService.HandleDefinitionRequest(textDocument, requestContext.Object), Task.Delay(TaskTimeout));