diff --git a/src/Microsoft.SqlTools.Credentials/project.json b/src/Microsoft.SqlTools.Credentials/project.json
index 1fc7981b..7e9da0d6 100644
--- a/src/Microsoft.SqlTools.Credentials/project.json
+++ b/src/Microsoft.SqlTools.Credentials/project.json
@@ -1,64 +1,64 @@
-{
- "name": "Microsoft.SqlTools.Credentials",
- "version": "1.0.0-*",
- "buildOptions": {
- "debugType": "portable",
- "emitEntryPoint": true,
- "embed": [
- "../Microsoft.SqlTools.ServiceLayer/Localization/sr.es.resx",
- "../Microsoft.SqlTools.ServiceLayer/Localization/sr.resx"
- ]
- },
- "configurations": {
- "Integration": {
- "buildOptions": {
- "define": [
- "WINDOWS_ONLY_BUILD"
- ],
- "emitEntryPoint": true
- }
- }
- },
- "dependencies": {
- "Newtonsoft.Json": "9.0.1",
- "System.Security.SecureString": "4.0.0",
- "System.Collections.Specialized": "4.0.1",
- "System.ComponentModel.TypeConverter": "4.1.0",
- "System.Diagnostics.Contracts": "4.0.1",
- "System.Diagnostics.TraceSource": "4.0.0",
- "NETStandard.Library": "1.6.0",
- "Microsoft.NETCore.Runtime.CoreCLR": "1.0.2",
- "Microsoft.NETCore.DotNetHostPolicy": "1.0.1",
- "Microsoft.DiaSymReader.Native": "1.4.1",
- "System.Diagnostics.Process": "4.1.0",
- "System.Threading.Thread": "4.0.0",
- "System.Runtime.Loader": "4.0.0",
- "System.Composition": "1.0.31-beta-24326-02",
- "Microsoft.Extensions.DependencyModel": "1.0.0",
- "Microsoft.SqlTools.Hosting": {
- "target": "project"
- }
- },
- "frameworks": {
- "netcoreapp1.0": {
- "dependencies": {
- "Microsoft.NETCore.App": {
- "version": "1.0.0"
- }
- },
- "imports": "dnxcore50"
- }
- },
- "runtimes": {
- "win7-x64": {},
- "win7-x86": {},
- "osx.10.11-x64": {},
- "ubuntu.14.04-x64": {},
- "ubuntu.16.04-x64": {},
- "centos.7-x64": {},
- "rhel.7.2-x64": {},
- "debian.8-x64": {},
- "fedora.23-x64": {},
- "opensuse.13.2-x64": {}
- }
-}
+{
+ "name": "Microsoft.SqlTools.Credentials",
+ "version": "1.0.0-*",
+ "buildOptions": {
+ "debugType": "portable",
+ "emitEntryPoint": true,
+ "embed": [
+ "../Microsoft.SqlTools.ServiceLayer/Localization/sr.es.resx",
+ "../Microsoft.SqlTools.ServiceLayer/Localization/sr.resx"
+ ]
+ },
+ "configurations": {
+ "Integration": {
+ "buildOptions": {
+ "define": [
+ "WINDOWS_ONLY_BUILD"
+ ],
+ "emitEntryPoint": true
+ }
+ }
+ },
+ "dependencies": {
+ "Newtonsoft.Json": "9.0.1",
+ "System.Security.SecureString": "4.0.0",
+ "System.Collections.Specialized": "4.0.1",
+ "System.ComponentModel.TypeConverter": "4.1.0",
+ "System.Diagnostics.Contracts": "4.0.1",
+ "System.Diagnostics.TraceSource": "4.0.0",
+ "NETStandard.Library": "1.6.0",
+ "Microsoft.NETCore.Runtime.CoreCLR": "1.0.2",
+ "Microsoft.NETCore.DotNetHostPolicy": "1.0.1",
+ "Microsoft.DiaSymReader.Native": "1.4.1",
+ "System.Diagnostics.Process": "4.1.0",
+ "System.Threading.Thread": "4.0.0",
+ "System.Runtime.Loader": "4.0.0",
+ "System.Composition": "1.0.31-beta-24326-02",
+ "Microsoft.Extensions.DependencyModel": "1.0.0",
+ "Microsoft.SqlTools.Hosting": {
+ "target": "project"
+ }
+ },
+ "frameworks": {
+ "netcoreapp1.0": {
+ "dependencies": {
+ "Microsoft.NETCore.App": {
+ "version": "1.0.0"
+ }
+ },
+ "imports": "dnxcore50"
+ }
+ },
+ "runtimes": {
+ "win7-x64": {},
+ "win7-x86": {},
+ "osx.10.11-x64": {},
+ "ubuntu.14.04-x64": {},
+ "ubuntu.16.04-x64": {},
+ "centos.7-x64": {},
+ "rhel.7.2-x64": {},
+ "debian.8-x64": {},
+ "fedora.23-x64": {},
+ "opensuse.13.2-x64": {}
+ }
+}
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Scripting/ScripterCore.cs b/src/Microsoft.SqlTools.ServiceLayer/Scripting/ScripterCore.cs
index 4faec400..76f9da3b 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Scripting/ScripterCore.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/Scripting/ScripterCore.cs
@@ -23,6 +23,7 @@ using Microsoft.SqlTools.Utility;
using ConnectionType = Microsoft.SqlTools.ServiceLayer.Connection.ConnectionType;
using Location = Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Location;
+
namespace Microsoft.SqlTools.ServiceLayer.Scripting
{
internal partial class Scripter
@@ -151,6 +152,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting
}
StringComparison caseSensitivity = this.Database.CaseSensitive ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase;
// if declarationItem matches the selected token, script SMO using that type
+
if (declarationItem.Title.Equals(tokenText, caseSensitivity))
{
return GetDefinitionUsingDeclarationType(declarationItem.Type, declarationItem.DatabaseQualifiedName, tokenText, schemaName);
diff --git a/src/Microsoft.SqlTools.ServiceLayer/sr.es.resx b/src/Microsoft.SqlTools.ServiceLayer/sr.es.resx
new file mode 100644
index 00000000..b1657f70
--- /dev/null
+++ b/src/Microsoft.SqlTools.ServiceLayer/sr.es.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ ES_LOCALIZATION
+
+
\ No newline at end of file
diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserSqlCmdTests.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserSqlCmdTests.cs
index f83478da..8f6e7ed8 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserSqlCmdTests.cs
+++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserSqlCmdTests.cs
@@ -1,65 +1,120 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-//
-
-using System;
-using Microsoft.SqlTools.ServiceLayer.BatchParser;
-using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
-using Xunit;
-
-namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
-{
- public class BatchParserSqlCmdTests : IDisposable
- {
- private BatchParserSqlCmd bpcmd;
- private PositionStruct testPOS;
- public BatchParserSqlCmdTests()
- {
- bpcmd = new BatchParserSqlCmd();
- testPOS = new PositionStruct();
- bpcmd.SetVariable(testPOS, "variable1", "test1");
- bpcmd.SetVariable(testPOS, "variable2", "test2");
- bpcmd.SetVariable(testPOS, "variable3", "test3");
- }
-
- public void Dispose()
- {
- Dispose(true);
- }
-
- private void Dispose(bool disposing)
- {
- if (disposing)
- {
- if (bpcmd != null)
- {
- bpcmd = null;
- }
- }
- }
-
- [Fact]
- public void CheckSetVariable()
- {
- Assert.Equal(bpcmd.InternalVariables.Count, 3);
- bpcmd.SetVariable(testPOS, "variable4", "test4");
- bpcmd.SetVariable(testPOS, "variable5", "test5");
- bpcmd.SetVariable(testPOS, "variable6", "test6");
- Assert.Equal(bpcmd.InternalVariables.Count, 6);
-
- }
-
- [Fact]
- public void CheckGetVariable()
- {
- string value = bpcmd.GetVariable(testPOS, "variable1");
- Assert.Equal("test1", value);
- value = bpcmd.GetVariable(testPOS, "variable2");
- Assert.Equal("test2", value);
- value = bpcmd.GetVariable(testPOS, "variable3");
- Assert.Equal("test3", value);
-
- }
- }
-}
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
+using System.IO;
+using Microsoft.SqlTools.ServiceLayer.BatchParser;
+using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
+using Moq;
+using Xunit;
+
+namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
+{
+ public class BatchParserSqlCmdTests : IDisposable
+ {
+ private BatchParserSqlCmd bpcmd;
+ private PositionStruct testPOS;
+ public BatchParserSqlCmdTests()
+ {
+ bpcmd = new BatchParserSqlCmd();
+ testPOS = new PositionStruct();
+ bpcmd.SetVariable(testPOS, "variable1", "test1");
+ bpcmd.SetVariable(testPOS, "variable2", "test2");
+ bpcmd.SetVariable(testPOS, "variable3", "test3");
+ }
+
+ public void Dispose()
+ {
+ Dispose(true);
+ }
+
+ private void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ if (bpcmd != null)
+ {
+ bpcmd = null;
+ }
+ }
+ }
+
+ [Fact]
+ public void CheckSetVariable()
+ {
+ Assert.Equal(bpcmd.InternalVariables.Count, 3);
+ bpcmd.SetVariable(testPOS, "variable4", "test4");
+ bpcmd.SetVariable(testPOS, "variable5", "test5");
+ bpcmd.SetVariable(testPOS, "variable6", "test6");
+ Assert.Equal(bpcmd.InternalVariables.Count, 6);
+
+ bpcmd.SetVariable(testPOS, "variable1", null);
+ }
+
+ [Fact]
+ public void CheckSetNullValueVariable()
+ {
+ bpcmd.SetVariable(testPOS, "variable6", null);
+ Assert.Equal(bpcmd.InternalVariables.Count, 5);
+ }
+
+ [Fact]
+ public void CheckGetVariable()
+ {
+ string value = bpcmd.GetVariable(testPOS, "variable1");
+ Assert.Equal("test1", value);
+ value = bpcmd.GetVariable(testPOS, "variable2");
+ Assert.Equal("test2", value);
+ value = bpcmd.GetVariable(testPOS, "variable3");
+ Assert.Equal("test3", value);
+ }
+
+ [Fact]
+ public void CheckGetNullVariable()
+ {
+ Assert.Null(bpcmd.GetVariable(testPOS, "variable6"));
+ }
+
+ [Fact]
+ public void CheckInclude()
+ {
+ TextReader textReader = null;
+ string outString = "out";
+ var result = bpcmd.Include(null, out textReader, out outString);
+ Assert.Equal(result, BatchParserAction.Abort);
+
+ }
+
+ [Fact]
+ public void CheckOnError()
+ {
+ var errorActionChanged = bpcmd.ErrorActionChanged;
+ var action = new OnErrorAction();
+ var result = bpcmd.OnError(null, action);
+ Assert.Equal(result, BatchParserAction.Continue);
+ bpcmd.ErrorActionChanged = null;
+ result = bpcmd.OnError(null, action);
+ Assert.NotEqual(result, BatchParserAction.Continue);
+ }
+
+ [Fact]
+ public void CheckConnectionChangedDelegate()
+ {
+ var initial = bpcmd.ConnectionChanged;
+ bpcmd.ConnectionChanged = null;
+ Assert.Null(bpcmd.ConnectionChanged);
+ }
+
+ [Fact]
+ public void CheckVariableSubstitutionDisabled()
+ {
+ bpcmd.DisableVariableSubstitution();
+ bpcmd.SetVariable(testPOS, "variable1", "test");
+ var result = bpcmd.GetVariable(testPOS, "variable1");
+ Assert.Null(result);
+ }
+
+ }
+}
diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserWrapperTests.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserWrapperTests.cs
index 6d73252e..ec863535 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserWrapperTests.cs
+++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserWrapperTests.cs
@@ -1,51 +1,54 @@
-using Microsoft.SqlTools.ServiceLayer.BatchParser;
-using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
-using Xunit;
-
-namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
-{
- public class BatchParserWrapperTests
- {
- private BatchParserWrapper parserWrapper;
- public BatchParserWrapperTests()
- {
- parserWrapper = new BatchParserWrapper();
- }
-
- [Fact]
- public void CheckSimpleSingleSQLBatchStatement()
- {
- string sqlScript = "select * from sys.objects";
- var batches = parserWrapper.GetBatches(sqlScript);
- Assert.Equal(1, batches.Count);
- BatchDefinition batch = batches[0];
- Assert.Equal(sqlScript, batch.BatchText);
- Assert.Equal(1, batch.StartLine);
- Assert.Equal(1, batch.StartColumn);
- Assert.Equal(2, batch.EndLine);
- Assert.Equal(sqlScript.Length, batch.EndColumn);
- }
-
- [Fact]
- public void CheckComment()
- {
- string sqlScript = "-- this is a comment --";
- var batches = parserWrapper.GetBatches(sqlScript);
- Assert.Equal(1, batches.Count);
- BatchDefinition batch = batches[0];
- Assert.Equal(sqlScript, batch.BatchText);
- Assert.Equal(1, batch.StartLine);
- Assert.Equal(1, batch.StartColumn);
- Assert.Equal(2, batch.EndLine);
- Assert.Equal(sqlScript.Length, batch.EndColumn);
- }
-
- [Fact]
- public void CheckNoOps()
- {
- string sqlScript = "GO";
- var batches = parserWrapper.GetBatches(sqlScript);
- Assert.Equal(0, batches.Count);
- }
- }
-}
+using Microsoft.SqlTools.ServiceLayer.BatchParser;
+using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
+using Xunit;
+
+namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
+{
+ public class BatchParserWrapperTests
+ {
+ [Fact]
+ public void CheckSimpleSingleSQLBatchStatement()
+ {
+ using (BatchParserWrapper parserWrapper = new BatchParserWrapper())
+ {
+ string sqlScript = "select * from sys.objects";
+ var batches = parserWrapper.GetBatches(sqlScript);
+ Assert.Equal(1, batches.Count);
+ BatchDefinition batch = batches[0];
+ Assert.Equal(sqlScript, batch.BatchText);
+ Assert.Equal(1, batch.StartLine);
+ Assert.Equal(1, batch.StartColumn);
+ Assert.Equal(2, batch.EndLine);
+ Assert.Equal(sqlScript.Length, batch.EndColumn);
+ }
+ }
+
+ [Fact]
+ public void CheckComment()
+ {
+ using (BatchParserWrapper parserWrapper = new BatchParserWrapper())
+ {
+ string sqlScript = "-- this is a comment --";
+ var batches = parserWrapper.GetBatches(sqlScript);
+ Assert.Equal(1, batches.Count);
+ BatchDefinition batch = batches[0];
+ Assert.Equal(sqlScript, batch.BatchText);
+ Assert.Equal(1, batch.StartLine);
+ Assert.Equal(1, batch.StartColumn);
+ Assert.Equal(2, batch.EndLine);
+ Assert.Equal(sqlScript.Length, batch.EndColumn);
+ }
+ }
+
+ [Fact]
+ public void CheckNoOps()
+ {
+ using (BatchParserWrapper parserWrapper = new BatchParserWrapper())
+ {
+ string sqlScript = "GO";
+ var batches = parserWrapper.GetBatches(sqlScript);
+ Assert.Equal(0, batches.Count);
+ }
+ }
+ }
+}
diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/ExecutionEngineTest.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/ExecutionEngineTest.cs
index d09bf8cc..36ed92f5 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/ExecutionEngineTest.cs
+++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/ExecutionEngineTest.cs
@@ -12,8 +12,10 @@ using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
using Microsoft.SqlTools.ServiceLayer.Connection;
using Microsoft.SqlTools.ServiceLayer.IntegrationTests.Utility;
using Microsoft.SqlTools.ServiceLayer.Test.Common;
+using Moq;
using Xunit;
+
namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.TSQLExecutionEngine
{
///
@@ -297,6 +299,14 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.TSQLExecutionEngine
Assert.True(CompareTwoStringLists(executor.ErrorMessageQueue, expErrorMessage));
Assert.True(CompareTwoIntLists(executor.ResultCountQueue, expResultCounts));
}
+
+ [Fact]
+ public void ExecutionEngineTest_DiscardConnection()
+ {
+ ExecutionEngine engine = new ExecutionEngine();
+ Assert.True(ConnectionDiscardWrapper(engine));
+
+ }
#endregion
#region Different execution conditions
@@ -456,6 +466,29 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.TSQLExecutionEngine
// However since that gets mapped to Failure anyhow, consider "Failure" as acceptable here
Assert.True(executor.ExecutionResult.HasFlag(ScriptExecutionResult.Failure), "Expected failure when invalid connection is present" );
}
+
+ ///
+ /// Test with multiple conditions true
+ ///
+ [Fact]
+ public void TestExecutionEngineConditions()
+ {
+ string sqlStatement = "select * from sys.databases\ngo\nselect name from sys.databases\ngo\nprint 'test'\ngo";
+ ExecutionEngineConditions conditions = new ExecutionEngineConditions();
+ conditions.IsNoExec = true;
+ conditions.IsStatisticsIO = true;
+ conditions.IsStatisticsTime = true;
+ conditions.IsEstimatedShowPlan = true;
+ TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions, false);
+ executor.Run();
+
+ //Get the expected values
+ List batchScripts = executor.BatchScripts;
+ ExecuteSqlBatch(batchScripts, connection);
+
+ Assert.Equal(ScriptExecutionResult.Success, executor.ExecutionResult);
+ Assert.True(CompareTwoIntLists(executor.ResultCountQueue, expResultCounts));
+ }
#endregion
#region SQL Commands
@@ -491,9 +524,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.TSQLExecutionEngine
{
TestExecutor executor = new TestExecutor(stmt, connection, conditions);
executor.Run();
-
- //Assert.AreEqual(ScriptExecutionResult.Failure, executor.ExecutionResult);
- //Assert.IsTrue(executor.ResultCountQueue.Count == 0);
+ Assert.True(executor.ResultCountQueue.Count == 0);
}
}
@@ -501,7 +532,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.TSQLExecutionEngine
#region Threading
///
- /// Test synchous cancel
+ /// Test synchronous cancel
///
[Fact]
public void ExecutionEngineTest_SyncCancel()
@@ -657,6 +688,69 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.TSQLExecutionEngine
#endregion
+ #region Get/Set Methods
+
+ [Fact]
+ public void TestShowStatements()
+ {
+ Assert.NotNull(ExecutionEngineConditions.ShowPlanXmlStatement(true));
+ Assert.NotNull(ExecutionEngineConditions.ShowPlanAllStatement(true));
+ Assert.NotNull(ExecutionEngineConditions.ShowPlanTextStatement(true));
+ Assert.NotNull(ExecutionEngineConditions.StatisticsXmlStatement(true));
+ Assert.NotNull(ExecutionEngineConditions.StatisticsProfileStatement(true));
+ Assert.NotNull(ExecutionEngineConditions.ParseOnlyStatement(true));
+ Assert.NotNull(ExecutionEngineConditions.NoExecStatement(true));
+ Assert.NotNull(ExecutionEngineConditions.StatisticsIOStatement(true));
+ Assert.NotNull(ExecutionEngineConditions.StatisticsTimeStatement(true));
+ Assert.NotNull(ExecutionEngineConditions.ResetStatement);
+ }
+
+ [Fact]
+ public void TestExecutionEngineConditionsSetMethods()
+ {
+ ExecutionEngineConditions conditions = new ExecutionEngineConditions();
+ bool getValue = conditions.IsScriptExecutionTracked;
+ conditions.IsScriptExecutionTracked = !getValue;
+ Assert.Equal(conditions.IsScriptExecutionTracked, !getValue);
+
+ getValue = conditions.IsEstimatedShowPlan;
+ conditions.IsEstimatedShowPlan = !getValue;
+ Assert.Equal(conditions.IsEstimatedShowPlan, !getValue);
+
+ getValue = conditions.IsActualShowPlan;
+ conditions.IsActualShowPlan = !getValue;
+ Assert.Equal(conditions.IsActualShowPlan, !getValue);
+
+ getValue = conditions.IsSuppressProviderMessageHeaders;
+ conditions.IsSuppressProviderMessageHeaders = !getValue;
+ Assert.Equal(conditions.IsSuppressProviderMessageHeaders, !getValue);
+
+ getValue = conditions.IsNoExec;
+ conditions.IsNoExec = !getValue;
+ Assert.Equal(conditions.IsNoExec, !getValue);
+
+ getValue = conditions.IsStatisticsIO;
+ conditions.IsStatisticsIO = !getValue;
+ Assert.Equal(conditions.IsStatisticsIO, !getValue);
+
+ getValue = conditions.IsShowPlanText;
+ conditions.IsShowPlanText = !getValue;
+ Assert.Equal(conditions.IsShowPlanText, !getValue);
+
+ getValue = conditions.IsStatisticsTime;
+ conditions.IsStatisticsTime = !getValue;
+ Assert.Equal(conditions.IsStatisticsTime, !getValue);
+
+ getValue = conditions.IsSqlCmd;
+ conditions.IsSqlCmd = !getValue;
+ Assert.Equal(conditions.IsSqlCmd, !getValue);
+
+ conditions.BatchSeparator = "GO";
+ Assert.Equal(conditions.BatchSeparator, "GO");
+ }
+
+ #endregion
+
#region Private methods
///
/// Connection to a database
@@ -782,6 +876,21 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.TSQLExecutionEngine
return isSame;
}
+
+ ///
+ /// Wrapper to test the Close method in ExecutionEngine
+ ///
+ ///
+ ///
+ private bool ConnectionDiscardWrapper(ExecutionEngine engine)
+ {
+ if (engine == null)
+ {
+ return false;
+ }
+ engine.Close(false, true, true);
+ return true;
+ }
#endregion
}
}
diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/TestExecutor.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/TestExecutor.cs
index fb15dfed..e29d38af 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/TestExecutor.cs
+++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/TestExecutor.cs
@@ -219,7 +219,10 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.TSQLExecutionEngine
sqlStatement = batch;
conditions.IsHaltOnError = exeCondition.IsHaltOnError;
conditions.IsParseOnly = exeCondition.IsParseOnly;
- conditions.IsTransactionWrapped = exeCondition.IsTransactionWrapped;
+ conditions.IsTransactionWrapped = exeCondition.IsTransactionWrapped;
+ conditions.IsNoExec = exeCondition.IsNoExec;
+ conditions.IsStatisticsIO = exeCondition.IsStatisticsIO;
+ conditions.IsStatisticsTime = exeCondition.IsStatisticsTime;
_cancel = cancelExecution;
connection = conn;