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:
David Shiflet
2020-08-05 13:43:14 -04:00
committed by GitHub
parent bf4911795f
commit 839acf67cd
205 changed files with 4146 additions and 4329 deletions

View File

@@ -13,7 +13,7 @@ using Microsoft.SqlTools.ServiceLayer.TaskServices.Contracts;
using Microsoft.SqlTools.ServiceLayer.Test.Common.RequestContextMocking;
using Microsoft.SqlTools.ServiceLayer.UnitTests.Utility;
using Moq;
using Xunit;
using NUnit.Framework;
namespace Microsoft.SqlTools.ServiceLayer.UnitTests.TaskServices
{
@@ -34,7 +34,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.TaskServices
service.InitializeService(serviceHostMock.Object);
}
[Fact]
[Test]
public async Task TaskListRequestErrorsIfParameterIsNull()
{
object errorResponse = null;
@@ -46,7 +46,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.TaskServices
Assert.True(((string)errorResponse).Contains("ArgumentNullException"));
}
[Fact]
[Test]
public void NewTaskShouldSendNotification()
{
serviceHostMock.AddEventHandling(TaskCreatedNotification.Type, null);
@@ -64,7 +64,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.TaskServices
It.Is<TaskProgressInfo>(t => t.TaskId == sqlTask.TaskId.ToString())), Times.AtLeastOnce());
}
[Fact]
[Test]
public async Task CancelTaskShouldCancelTheOperationAndSendNotification()
{
serviceHostMock.AddEventHandling(TaskCreatedNotification.Type, null);
@@ -93,7 +93,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.TaskServices
}
[Fact]
[Test]
public async Task TaskListTaskShouldReturnAllTasks()
{
serviceHostMock.AddEventHandling(TaskCreatedNotification.Type, null);