mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-24 09:35:39 -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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user