Revert "Rollback migration changes" (#1099)

* Revert "Revert "Initial migration service changes for assessment support (#1093)" (#1098)"

This reverts commit e96c0064ad.

* Move SQL Tools Service last in Main project list
This commit is contained in:
Karl Burtram
2020-10-16 16:29:22 -07:00
committed by GitHub
parent e96c0064ad
commit b9e1618260
15 changed files with 1820 additions and 517 deletions

View File

@@ -0,0 +1,40 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Threading.Tasks;
using Microsoft.SqlTools.Hosting.Protocol;
using Microsoft.SqlTools.ServiceLayer.IntegrationTests.Utility;
using Microsoft.SqlTools.ServiceLayer.Migration;
using Microsoft.SqlTools.ServiceLayer.Migration.Contracts;
using Microsoft.SqlTools.ServiceLayer.SqlAssessment.Contracts;
using Microsoft.SqlTools.ServiceLayer.Test.Common;
using Moq;
using NUnit.Framework;
namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Migration
{
public class MigrationgentServiceTests
{
[Test]
public async Task TestHandleMigrationAssessmentRequest()
{
using (SelfCleaningTempFile queryTempFile = new SelfCleaningTempFile())
{
var connectionResult = await LiveConnectionHelper.InitLiveConnectionInfoAsync("master", queryTempFile.FilePath);
var requestParams = new MigrationAssessmentsParams()
{
OwnerUri = connectionResult.ConnectionInfo.OwnerUri
};
var requestContext = new Mock<RequestContext<MigrationAssessmentResult>>();
MigrationService service = new MigrationService();
await service.HandleMigrationAssessmentsRequest(requestParams, requestContext.Object);
requestContext.VerifyAll();
}
}
}
}