From dc259d70ad39b1fc95f5a63840edfa6e01c1de6b Mon Sep 17 00:00:00 2001 From: Benjin Dubishar Date: Mon, 27 Feb 2023 16:14:59 -0800 Subject: [PATCH] Correcting typo (#1882) * Correcting tyo * removing extra space * tests --- .../Contracts/Projects/GetCrossPlatformCompatibility.cs | 6 +++--- .../SqlProjects/SqlProjectsService.cs | 6 +++--- src/Microsoft.SqlTools.ServiceLayer/Utility/BaseService.cs | 1 - .../SqlProjects/SqlProjectsServiceTests.cs | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Microsoft.SqlTools.ServiceLayer/SqlProjects/Contracts/Projects/GetCrossPlatformCompatibility.cs b/src/Microsoft.SqlTools.ServiceLayer/SqlProjects/Contracts/Projects/GetCrossPlatformCompatibility.cs index f169bc40..efce80c5 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/SqlProjects/Contracts/Projects/GetCrossPlatformCompatibility.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/SqlProjects/Contracts/Projects/GetCrossPlatformCompatibility.cs @@ -11,15 +11,15 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts /// /// Get the cross-platform compatibility status for a project /// - public class GetCrossPlatformCompatiblityRequest + public class GetCrossPlatformCompatibilityRequest { - public static readonly RequestType Type = RequestType.Create("sqlProjects/getCrossPlatformCompatibility"); + public static readonly RequestType Type = RequestType.Create("sqlProjects/getCrossPlatformCompatibility"); } /// /// Result containing whether the project is cross-platform compatible /// - public class GetCrossPlatformCompatiblityResult : ResultStatus + public class GetCrossPlatformCompatibilityResult : ResultStatus { /// /// Whether the project is cross-platform compatible diff --git a/src/Microsoft.SqlTools.ServiceLayer/SqlProjects/SqlProjectsService.cs b/src/Microsoft.SqlTools.ServiceLayer/SqlProjects/SqlProjectsService.cs index d706682f..b73d66f7 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/SqlProjects/SqlProjectsService.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/SqlProjects/SqlProjectsService.cs @@ -44,7 +44,7 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects serviceHost.SetRequestHandler(OpenSqlProjectRequest.Type, HandleOpenSqlProjectRequest, isParallelProcessingSupported: true); serviceHost.SetRequestHandler(CloseSqlProjectRequest.Type, HandleCloseSqlProjectRequest, isParallelProcessingSupported: true); serviceHost.SetRequestHandler(CreateSqlProjectRequest.Type, HandleCreateSqlProjectRequest, isParallelProcessingSupported: true); - serviceHost.SetRequestHandler(GetCrossPlatformCompatiblityRequest.Type, HandleGetCrossPlatformCompatibilityRequest, isParallelProcessingSupported: true); + serviceHost.SetRequestHandler(GetCrossPlatformCompatibilityRequest.Type, HandleGetCrossPlatformCompatibilityRequest, isParallelProcessingSupported: true); serviceHost.SetRequestHandler(UpdateProjectForCrossPlatformRequest.Type, HandleUpdateProjectForCrossPlatformRequest, isParallelProcessingSupported: false); // SQL object script functions @@ -108,11 +108,11 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects }, requestContext); } - internal async Task HandleGetCrossPlatformCompatibilityRequest(SqlProjectParams requestParams, RequestContext requestContext) + internal async Task HandleGetCrossPlatformCompatibilityRequest(SqlProjectParams requestParams, RequestContext requestContext) { await RunWithErrorHandling(() => { - return new GetCrossPlatformCompatiblityResult() + return new GetCrossPlatformCompatibilityResult() { Success = true, ErrorMessage = null, diff --git a/src/Microsoft.SqlTools.ServiceLayer/Utility/BaseService.cs b/src/Microsoft.SqlTools.ServiceLayer/Utility/BaseService.cs index 142e9267..b6a1b0f6 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Utility/BaseService.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Utility/BaseService.cs @@ -47,7 +47,6 @@ namespace Microsoft.SqlTools.ServiceLayer.Utility }, requestContext); } - /// /// Synchronous action with custom result /// diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/SqlProjects/SqlProjectsServiceTests.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/SqlProjects/SqlProjectsServiceTests.cs index debd76b8..86f04e99 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/SqlProjects/SqlProjectsServiceTests.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/SqlProjects/SqlProjectsServiceTests.cs @@ -701,7 +701,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.SqlProjects SqlProjectsService service = new(); /// Validate that the cross-platform status can be fetched - MockRequest getRequestMock = new(); + MockRequest getRequestMock = new(); await service.HandleGetCrossPlatformCompatibilityRequest(new SqlProjectParams() { ProjectUri = projectPath @@ -727,7 +727,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.SqlProjects }, getRequestMock.Object); getRequestMock.AssertSuccess(nameof(service.HandleGetCrossPlatformCompatibilityRequest)); - Assert.IsTrue(((GetCrossPlatformCompatiblityResult)getRequestMock.Result).IsCrossPlatformCompatible, "Input file should be cross-platform compatible after conversion"); + Assert.IsTrue(((GetCrossPlatformCompatibilityResult)getRequestMock.Result).IsCrossPlatformCompatible, "Input file should be cross-platform compatible after conversion"); } #region Helpers