mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-17 01:25:40 -05:00
Allow empty query string text (#415)
* Allow empty query string text * Remove test that is no longer valid * Remove test that is no longer valid
This commit is contained in:
@@ -396,31 +396,6 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution.Execution
|
||||
Assert.Equal(1, queryService.ActiveQueries.Count);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task QueryExecuteMissingSelectionTest()
|
||||
{
|
||||
// Given:
|
||||
// ... A workspace with a standard query is configured
|
||||
var workspaceService = Common.GetPrimedWorkspaceService(string.Empty);
|
||||
|
||||
// If:
|
||||
// ... I request to execute a query with a missing query string
|
||||
var queryService = Common.GetPrimedExecutionService(null, true, false, workspaceService);
|
||||
var queryParams = new ExecuteDocumentSelectionParams { OwnerUri = Constants.OwnerUri, QuerySelection = null};
|
||||
|
||||
var efv = new EventFlowValidator<ExecuteRequestResult>()
|
||||
.AddStandardErrorValidation()
|
||||
.Complete();
|
||||
await queryService.HandleExecuteRequest(queryParams, efv.Object);
|
||||
|
||||
// Then:
|
||||
// ... Am error should have been sent
|
||||
efv.Validate();
|
||||
|
||||
// ... There should not be an active query
|
||||
Assert.Empty(queryService.ActiveQueries);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task QueryExecuteInvalidQueryTest()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user