mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-19 09:35:36 -05:00
Convert most tools service tests to nunit (#1037)
* Remove xunit dependency from testdriver * swap expected/actual as needed * Convert Test.Common to nunit * port hosting unit tests to nunit * port batchparser integration tests to nunit * port testdriver.tests to nunit * fix target to copy dependency * port servicelayer unittests to nunit * more unit test fixes * port integration tests to nunit * fix test method type * try using latest windows build for PRs * reduce test memory use
This commit is contained in:
@@ -15,10 +15,11 @@ using Microsoft.SqlTools.ServiceLayer.Profiler;
|
||||
using Microsoft.SqlTools.ServiceLayer.Profiler.Contracts;
|
||||
using Microsoft.SqlTools.ServiceLayer.UnitTests.Utility;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Profiler
|
||||
{
|
||||
[TestFixture]
|
||||
/// <summary>
|
||||
/// Unit tests for ProfilerService
|
||||
/// </summary>
|
||||
@@ -29,7 +30,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Profiler
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
// TODO: Fix flaky test. See https://github.com/Microsoft/sqltoolsservice/issues/459
|
||||
//[Fact]
|
||||
//[Test]
|
||||
public async Task TestStartProfilingRequest()
|
||||
{
|
||||
string sessionId = null;
|
||||
@@ -84,7 +85,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Profiler
|
||||
requestContext.VerifyAll();
|
||||
|
||||
// Check that the correct XEvent session was started
|
||||
Assert.Equal(sessionId, "1");
|
||||
Assert.AreEqual("1", sessionId);
|
||||
|
||||
// check that the proper owner Uri was used
|
||||
Assert.True(recievedEvents);
|
||||
@@ -94,7 +95,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Profiler
|
||||
/// Test stopping a session and receiving event callback
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Fact]
|
||||
[Test]
|
||||
public async Task TestStopProfilingRequest()
|
||||
{
|
||||
bool success = false;
|
||||
@@ -147,7 +148,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Profiler
|
||||
/// Test pausing then resuming a session
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Fact]
|
||||
[Test]
|
||||
public async Task TestPauseProfilingRequest()
|
||||
{
|
||||
bool success = false;
|
||||
@@ -238,7 +239,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Profiler
|
||||
/// <summary>
|
||||
/// Test notifications for stopped sessions
|
||||
/// </summary>
|
||||
[Fact]
|
||||
[Test]
|
||||
public async Task TestStoppedSessionNotification()
|
||||
{
|
||||
bool sessionStopped = false;
|
||||
|
||||
Reference in New Issue
Block a user