mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 17:23:27 -05:00
Execute SQL statement at cursor location (#412)
* Stage changes to other machine * Parse sql statement from script document * Fix a few typos and minor changes * Fix bug
This commit is contained in:
@@ -21,6 +21,20 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution.Execution
|
||||
|
||||
#region Get SQL Tests
|
||||
|
||||
[Fact]
|
||||
public void ExecuteDocumentStatementTest()
|
||||
{
|
||||
string query = string.Format("{0}{1}GO{1}{0}", Constants.StandardQuery, Environment.NewLine);
|
||||
var workspaceService = GetDefaultWorkspaceService(query);
|
||||
var queryService = new QueryExecutionService(null, workspaceService);
|
||||
|
||||
var queryParams = new ExecuteDocumentStatementParams { OwnerUri = Constants.OwnerUri, Line = 0, Column = 0 };
|
||||
var queryText = queryService.GetSqlText(queryParams);
|
||||
|
||||
// The text should match the standard query
|
||||
Assert.Equal(queryText, Constants.StandardQuery);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GetSqlTextFromDocumentRequestFull()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user