Files
sqltoolsservice/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Tests/ConnectionTests.cs
Karl Burtram f46fc0c787 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
2016-10-28 20:33:32 -07:00

46 lines
1.3 KiB
C#

//
// 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();
}
}
}
}