mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-19 01:25:40 -05:00
Add additional test cases (#125)
Test-only changes for code coverage. Please review the comment and I'll include the changes in the next iteration. * Add more tests * Add some more additional test cases
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// 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.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts;
|
||||
using Microsoft.SqlTools.ServiceLayer.TestDriver.Utility;
|
||||
using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.TestDriver.Tests
|
||||
{
|
||||
/// <summary>
|
||||
/// Language Service end-to-end integration tests
|
||||
/// </summary>
|
||||
public class ConnectionTests : TestBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Try to connect with invalid credentials
|
||||
/// </summary>
|
||||
//[Fact]
|
||||
public async Task InvalidConnection()
|
||||
{
|
||||
try
|
||||
{
|
||||
string ownerUri = System.IO.Path.GetTempFileName();
|
||||
bool connected = await Connect(ownerUri, ConnectionTestUtils.InvalidConnection);
|
||||
Assert.False(connected, "Invalid connection is failed to connect");
|
||||
|
||||
await Disconnect(ownerUri);
|
||||
}
|
||||
finally
|
||||
{
|
||||
WaitForExit();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user