fixed the issue with defualt values for options not loaded correctly (#581)

This commit is contained in:
Leila Lali
2018-02-06 17:23:23 -08:00
committed by Karl Burtram
parent efd38be0be
commit fc4282b701
3 changed files with 14 additions and 5 deletions

View File

@@ -89,7 +89,14 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Scripting
[Fact]
public async void VerifyScriptAsCreateTable()
{
string query = "CREATE TABLE testTable1 (c1 int)";
string query = @"CREATE TABLE testTable1 (c1 int)
GO
CREATE CLUSTERED INDEX [ClusteredIndex-1] ON [dbo].[testTable1]
(
[c1] ASC
)
GO
";
ScriptingOperationType scriptCreateDrop = ScriptingOperationType.Create;
ScriptingObject scriptingObject = new ScriptingObject
{
@@ -97,9 +104,10 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Scripting
Schema = "dbo",
Type = "Table"
};
string expectedScript = "CREATE TABLE [dbo].[testTable1]";
List<string> expectedScripts = new List<string> { "CREATE TABLE [dbo].[testTable1]", "CREATE CLUSTERED INDEX [ClusteredIndex-1] ON [dbo].[testTable1]" };
await VerifyScriptAs(query, scriptingObject, scriptCreateDrop, expectedScript);
await VerifyScriptAsForMultipleObjects(query, new List<ScriptingObject> { scriptingObject }, scriptCreateDrop, expectedScripts);
}
[Fact]