mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 18:47:57 -05:00
Task/batch parser wrapper tests (#327)
* added more batch parser tests * fixed merge conflicts * change debug type to portable * fixed imports according to review * fixed sql cmd tests * making change to check appveyor tests * removed coverage result file
This commit is contained in:
@@ -49,15 +49,16 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
|
|||||||
bpcmd.SetVariable(testPOS, "variable5", "test5");
|
bpcmd.SetVariable(testPOS, "variable5", "test5");
|
||||||
bpcmd.SetVariable(testPOS, "variable6", "test6");
|
bpcmd.SetVariable(testPOS, "variable6", "test6");
|
||||||
Assert.Equal(bpcmd.InternalVariables.Count, 6);
|
Assert.Equal(bpcmd.InternalVariables.Count, 6);
|
||||||
|
|
||||||
bpcmd.SetVariable(testPOS, "variable1", null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void CheckSetNullValueVariable()
|
public void CheckSetNullValueVariable()
|
||||||
{
|
{
|
||||||
bpcmd.SetVariable(testPOS, "variable6", null);
|
Assert.Equal(bpcmd.InternalVariables.Count, 3);
|
||||||
Assert.Equal(bpcmd.InternalVariables.Count, 5);
|
bpcmd.SetVariable(testPOS, "variable4", "test4");
|
||||||
|
Assert.Equal(bpcmd.InternalVariables.Count, 4);
|
||||||
|
bpcmd.SetVariable(testPOS, "variable4", null);
|
||||||
|
Assert.Equal(bpcmd.InternalVariables.Count, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
@@ -94,9 +95,6 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
|
|||||||
var action = new OnErrorAction();
|
var action = new OnErrorAction();
|
||||||
var result = bpcmd.OnError(null, action);
|
var result = bpcmd.OnError(null, action);
|
||||||
Assert.Equal(result, BatchParserAction.Continue);
|
Assert.Equal(result, BatchParserAction.Continue);
|
||||||
bpcmd.ErrorActionChanged = null;
|
|
||||||
result = bpcmd.OnError(null, action);
|
|
||||||
Assert.NotEqual(result, BatchParserAction.Continue);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|||||||
@@ -443,7 +443,6 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.TSQLExecutionEngine
|
|||||||
TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions, -1);
|
TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions, -1);
|
||||||
executor.Run();
|
executor.Run();
|
||||||
Assert.Equal(executor.ExecutionResult, ScriptExecutionResult.Success);
|
Assert.Equal(executor.ExecutionResult, ScriptExecutionResult.Success);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user