mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Correcting typo (#1882)
* Correcting tyo * removing extra space * tests
This commit is contained in:
@@ -11,15 +11,15 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the cross-platform compatibility status for a project
|
/// Get the cross-platform compatibility status for a project
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GetCrossPlatformCompatiblityRequest
|
public class GetCrossPlatformCompatibilityRequest
|
||||||
{
|
{
|
||||||
public static readonly RequestType<SqlProjectParams, GetCrossPlatformCompatiblityResult> Type = RequestType<SqlProjectParams, GetCrossPlatformCompatiblityResult>.Create("sqlProjects/getCrossPlatformCompatibility");
|
public static readonly RequestType<SqlProjectParams, GetCrossPlatformCompatibilityResult> Type = RequestType<SqlProjectParams, GetCrossPlatformCompatibilityResult>.Create("sqlProjects/getCrossPlatformCompatibility");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Result containing whether the project is cross-platform compatible
|
/// Result containing whether the project is cross-platform compatible
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GetCrossPlatformCompatiblityResult : ResultStatus
|
public class GetCrossPlatformCompatibilityResult : ResultStatus
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether the project is cross-platform compatible
|
/// Whether the project is cross-platform compatible
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects
|
|||||||
serviceHost.SetRequestHandler(OpenSqlProjectRequest.Type, HandleOpenSqlProjectRequest, isParallelProcessingSupported: true);
|
serviceHost.SetRequestHandler(OpenSqlProjectRequest.Type, HandleOpenSqlProjectRequest, isParallelProcessingSupported: true);
|
||||||
serviceHost.SetRequestHandler(CloseSqlProjectRequest.Type, HandleCloseSqlProjectRequest, isParallelProcessingSupported: true);
|
serviceHost.SetRequestHandler(CloseSqlProjectRequest.Type, HandleCloseSqlProjectRequest, isParallelProcessingSupported: true);
|
||||||
serviceHost.SetRequestHandler(CreateSqlProjectRequest.Type, HandleCreateSqlProjectRequest, 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);
|
serviceHost.SetRequestHandler(UpdateProjectForCrossPlatformRequest.Type, HandleUpdateProjectForCrossPlatformRequest, isParallelProcessingSupported: false);
|
||||||
|
|
||||||
// SQL object script functions
|
// SQL object script functions
|
||||||
@@ -108,11 +108,11 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects
|
|||||||
}, requestContext);
|
}, requestContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal async Task HandleGetCrossPlatformCompatibilityRequest(SqlProjectParams requestParams, RequestContext<GetCrossPlatformCompatiblityResult> requestContext)
|
internal async Task HandleGetCrossPlatformCompatibilityRequest(SqlProjectParams requestParams, RequestContext<GetCrossPlatformCompatibilityResult> requestContext)
|
||||||
{
|
{
|
||||||
await RunWithErrorHandling(() =>
|
await RunWithErrorHandling(() =>
|
||||||
{
|
{
|
||||||
return new GetCrossPlatformCompatiblityResult()
|
return new GetCrossPlatformCompatibilityResult()
|
||||||
{
|
{
|
||||||
Success = true,
|
Success = true,
|
||||||
ErrorMessage = null,
|
ErrorMessage = null,
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ namespace Microsoft.SqlTools.ServiceLayer.Utility
|
|||||||
}, requestContext);
|
}, requestContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Synchronous action with custom result
|
/// Synchronous action with custom result
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -701,7 +701,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.SqlProjects
|
|||||||
SqlProjectsService service = new();
|
SqlProjectsService service = new();
|
||||||
|
|
||||||
/// Validate that the cross-platform status can be fetched
|
/// Validate that the cross-platform status can be fetched
|
||||||
MockRequest<GetCrossPlatformCompatiblityResult> getRequestMock = new();
|
MockRequest<GetCrossPlatformCompatibilityResult> getRequestMock = new();
|
||||||
await service.HandleGetCrossPlatformCompatibilityRequest(new SqlProjectParams()
|
await service.HandleGetCrossPlatformCompatibilityRequest(new SqlProjectParams()
|
||||||
{
|
{
|
||||||
ProjectUri = projectPath
|
ProjectUri = projectPath
|
||||||
@@ -727,7 +727,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.SqlProjects
|
|||||||
}, getRequestMock.Object);
|
}, getRequestMock.Object);
|
||||||
|
|
||||||
getRequestMock.AssertSuccess(nameof(service.HandleGetCrossPlatformCompatibilityRequest));
|
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
|
#region Helpers
|
||||||
|
|||||||
Reference in New Issue
Block a user