mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Adding missing properties to GetProjectProperties call; also renaming NoneScript to NoneItem (#1890)
* Renaming NoneScript to NoneItem * missed a file * Fixing comments * Adding ProjectStyle to properties * Projects nuget bump * Adding DatabaseSchemaProvider to the props
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<PackageReference Update="Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider" Version="1.1.1" />
|
||||
<PackageReference Update="Microsoft.SqlServer.Management.SmoMetadataProvider" Version="170.12.0" />
|
||||
<PackageReference Update="Microsoft.SqlServer.DacFx" Version="161.8406.0-preview" />
|
||||
<PackageReference Update="Microsoft.SqlServer.DacFx.Projects" Version="161.8416.0-alpha" />
|
||||
<PackageReference Update="Microsoft.SqlServer.DacFx.Projects" Version="161.8420.0-alpha" />
|
||||
<PackageReference Update="Microsoft.Azure.Kusto.Data" Version="9.0.4" />
|
||||
<PackageReference Update="Microsoft.Azure.Kusto.Language" Version="9.0.4" />
|
||||
<PackageReference Update="Microsoft.SqlServer.Assessment" Version="[1.1.17]" />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -11,6 +11,9 @@ using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Get all the database references in a project
|
||||
/// </summary>
|
||||
public class GetDatabaseReferencesRequest
|
||||
{
|
||||
public static readonly RequestType<SqlProjectParams, GetDatabaseReferencesResult> Type = RequestType<SqlProjectParams, GetDatabaseReferencesResult>.Create("sqlProjects/getDatabaseReferences");
|
||||
|
||||
@@ -10,6 +10,9 @@ using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Get all the folders in a project
|
||||
/// </summary>
|
||||
public class GetFoldersRequest
|
||||
{
|
||||
public static readonly RequestType<SqlProjectParams, GetFoldersResult> Type = RequestType<SqlProjectParams, GetFoldersResult>.Create("sqlProjects/getFolders");
|
||||
|
||||
@@ -9,10 +9,10 @@ using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Add a SQL object script to a project
|
||||
/// Add a None item to a project
|
||||
/// </summary>
|
||||
public class AddNoneScriptRequest
|
||||
public class AddNoneItemRequest
|
||||
{
|
||||
public static readonly RequestType<SqlProjectScriptParams, ResultStatus> Type = RequestType<SqlProjectScriptParams, ResultStatus>.Create("sqlProjects/addNoneScript");
|
||||
public static readonly RequestType<SqlProjectScriptParams, ResultStatus> Type = RequestType<SqlProjectScriptParams, ResultStatus>.Create("sqlProjects/addNoneItem");
|
||||
}
|
||||
}
|
||||
@@ -4,15 +4,15 @@
|
||||
//
|
||||
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||
|
||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Delete a SQL object script from a project
|
||||
/// Delete a None item from a project
|
||||
/// </summary>
|
||||
public class DeleteNoneScriptRequest
|
||||
public class DeleteNoneItemRequest
|
||||
{
|
||||
public static readonly RequestType<SqlProjectScriptParams, ResultStatus> Type = RequestType<SqlProjectScriptParams, ResultStatus>.Create("sqlProjects/deleteNoneScript");
|
||||
public static readonly RequestType<SqlProjectScriptParams, ResultStatus> Type = RequestType<SqlProjectScriptParams, ResultStatus>.Create("sqlProjects/deleteNoneItem");
|
||||
}
|
||||
}
|
||||
@@ -9,10 +9,10 @@ using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Exclude a SQL object script from a project
|
||||
/// Exclude a None item from a project
|
||||
/// </summary>
|
||||
public class ExcludeNoneScriptRequest
|
||||
public class ExcludeNoneItemRequest
|
||||
{
|
||||
public static readonly RequestType<SqlProjectScriptParams, ResultStatus> Type = RequestType<SqlProjectScriptParams, ResultStatus>.Create("sqlProjects/excludeNoneScript");
|
||||
public static readonly RequestType<SqlProjectScriptParams, ResultStatus> Type = RequestType<SqlProjectScriptParams, ResultStatus>.Create("sqlProjects/excludeNoneItem");
|
||||
}
|
||||
}
|
||||
@@ -3,14 +3,15 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
|
||||
{
|
||||
public class GetNoneScriptsRequest
|
||||
/// <summary>
|
||||
/// Get all the None items in a project
|
||||
/// </summary>
|
||||
public class GetNoneItemsRequest
|
||||
{
|
||||
public static readonly RequestType<SqlProjectParams, GetScriptsResult> Type = RequestType<SqlProjectParams, GetScriptsResult>.Create("sqlProjects/getNoneScripts");
|
||||
public static readonly RequestType<SqlProjectParams, GetScriptsResult> Type = RequestType<SqlProjectParams, GetScriptsResult>.Create("sqlProjects/getNoneItems");
|
||||
}
|
||||
}
|
||||
@@ -3,18 +3,16 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Move a SQL object script in a project
|
||||
/// Move a None item in a project
|
||||
/// </summary>
|
||||
public class MoveNoneScriptRequest
|
||||
public class MoveNoneItemRequest
|
||||
{
|
||||
public static readonly RequestType<MoveItemParams, ResultStatus> Type = RequestType<MoveItemParams, ResultStatus>.Create("sqlProjects/moveNoneScript");
|
||||
public static readonly RequestType<MoveItemParams, ResultStatus> Type = RequestType<MoveItemParams, ResultStatus>.Create("sqlProjects/moveNoneItem");
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,13 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Get all the post-deployment scripts in a project
|
||||
/// </summary>
|
||||
public class GetPostDeploymentScriptsRequest
|
||||
{
|
||||
public static readonly RequestType<SqlProjectParams, GetScriptsResult> Type = RequestType<SqlProjectParams, GetScriptsResult>.Create("sqlProjects/getPostDeploymentScripts");
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Get all the pre-deployment scripts in a project
|
||||
/// </summary>
|
||||
public class GetPreDeploymentScriptsRequest
|
||||
{
|
||||
public static readonly RequestType<SqlProjectParams, GetScriptsResult> Type = RequestType<SqlProjectParams, GetScriptsResult>.Create("sqlProjects/getPreDeploymentScripts");
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
using Microsoft.SqlServer.Dac.Projects;
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
|
||||
@@ -54,5 +55,14 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
|
||||
/// </summary>
|
||||
public string? DatabaseSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Style of the .sqlproj file - SdkStyle or LegacyStyle
|
||||
/// </summary>
|
||||
public ProjectType ProjectStyle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Database Schema Provider, in the format "Microsoft.Data.Tools.Schema.Sql.SqlXYZDatabaseSchemaProvider"
|
||||
/// </summary>
|
||||
public string DatabaseSchemaProvider { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,9 @@ using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Get all the SQLCMD variables in a project
|
||||
/// </summary>
|
||||
public class GetSqlCmdVariablesRequest
|
||||
{
|
||||
public static readonly RequestType<SqlProjectParams, GetSqlCmdVariablesResult> Type = RequestType<SqlProjectParams, GetSqlCmdVariablesResult>.Create("sqlProjects/getSqlCmdVariables");
|
||||
|
||||
@@ -10,6 +10,9 @@ using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Get all the SQL object scripts in a project
|
||||
/// </summary>
|
||||
public class GetSqlObjectScriptsRequest
|
||||
{
|
||||
public static readonly RequestType<SqlProjectParams, GetScriptsResult> Type = RequestType<SqlProjectParams, GetScriptsResult>.Create("sqlProjects/getSqlObjectScripts");
|
||||
|
||||
@@ -70,11 +70,11 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects
|
||||
serviceHost.SetRequestHandler(MovePostDeploymentScriptRequest.Type, HandleMovePostDeploymentScriptRequest, isParallelProcessingSupported: false);
|
||||
|
||||
// None script functions
|
||||
serviceHost.SetRequestHandler(GetNoneScriptsRequest.Type, HandleGetNoneScriptsRequest, isParallelProcessingSupported: true);
|
||||
serviceHost.SetRequestHandler(AddNoneScriptRequest.Type, HandleAddNoneScriptRequest, isParallelProcessingSupported: false);
|
||||
serviceHost.SetRequestHandler(DeleteNoneScriptRequest.Type, HandleDeleteNoneScriptRequest, isParallelProcessingSupported: false);
|
||||
serviceHost.SetRequestHandler(ExcludeNoneScriptRequest.Type, HandleExcludeNoneScriptRequest, isParallelProcessingSupported: false);
|
||||
serviceHost.SetRequestHandler(MoveNoneScriptRequest.Type, HandleMoveNoneScriptRequest, isParallelProcessingSupported: false);
|
||||
serviceHost.SetRequestHandler(GetNoneItemsRequest.Type, HandleGetNoneItemsRequest, isParallelProcessingSupported: true);
|
||||
serviceHost.SetRequestHandler(AddNoneItemRequest.Type, HandleAddNoneItemRequest, isParallelProcessingSupported: false);
|
||||
serviceHost.SetRequestHandler(DeleteNoneItemRequest.Type, HandleDeleteNoneItemRequest, isParallelProcessingSupported: false);
|
||||
serviceHost.SetRequestHandler(ExcludeNoneItemRequest.Type, HandleExcludeNoneItemRequest, isParallelProcessingSupported: false);
|
||||
serviceHost.SetRequestHandler(MoveNoneItemRequest.Type, HandleMoveNoneItemRequest, isParallelProcessingSupported: false);
|
||||
|
||||
// Folder functions
|
||||
serviceHost.SetRequestHandler(GetFoldersRequest.Type, HandleGetFoldersRequest, isParallelProcessingSupported: true);
|
||||
@@ -139,18 +139,20 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects
|
||||
{
|
||||
await RunWithErrorHandling(() =>
|
||||
{
|
||||
SqlProjectProperties props = GetProject(requestParams.ProjectUri).Properties;
|
||||
SqlProject project = GetProject(requestParams.ProjectUri);
|
||||
|
||||
return new GetProjectPropertiesResult()
|
||||
{
|
||||
Success = true,
|
||||
ErrorMessage = null,
|
||||
ProjectGuid = props.ProjectGuid,
|
||||
Configuration = props.Configuration,
|
||||
Platform = props.Platform,
|
||||
OutputPath = props.OutputPath,
|
||||
DefaultCollation = props.DefaultCollation,
|
||||
DatabaseSource = props.DatabaseSource,
|
||||
ProjectGuid = project.Properties.ProjectGuid,
|
||||
Configuration = project.Properties.Configuration,
|
||||
Platform = project.Properties.Platform,
|
||||
OutputPath = project.Properties.OutputPath,
|
||||
DefaultCollation = project.Properties.DefaultCollation,
|
||||
DatabaseSource = project.Properties.DatabaseSource,
|
||||
ProjectStyle = project.SqlProjStyle,
|
||||
DatabaseSchemaProvider = project.DatabaseSchemaProvider
|
||||
};
|
||||
}, requestContext);
|
||||
}
|
||||
@@ -273,7 +275,7 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects
|
||||
|
||||
#region None script functions
|
||||
|
||||
internal async Task HandleGetNoneScriptsRequest(SqlProjectParams requestParams, RequestContext<GetScriptsResult> requestContext)
|
||||
internal async Task HandleGetNoneItemsRequest(SqlProjectParams requestParams, RequestContext<GetScriptsResult> requestContext)
|
||||
{
|
||||
await RunWithErrorHandling(() =>
|
||||
{
|
||||
@@ -286,22 +288,22 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects
|
||||
}, requestContext);
|
||||
}
|
||||
|
||||
internal async Task HandleAddNoneScriptRequest(SqlProjectScriptParams requestParams, RequestContext<ResultStatus> requestContext)
|
||||
internal async Task HandleAddNoneItemRequest(SqlProjectScriptParams requestParams, RequestContext<ResultStatus> requestContext)
|
||||
{
|
||||
await RunWithErrorHandling(() => GetProject(requestParams.ProjectUri).NoneScripts.Add(new NoneScript(requestParams.Path!)), requestContext);
|
||||
}
|
||||
|
||||
internal async Task HandleDeleteNoneScriptRequest(SqlProjectScriptParams requestParams, RequestContext<ResultStatus> requestContext)
|
||||
internal async Task HandleDeleteNoneItemRequest(SqlProjectScriptParams requestParams, RequestContext<ResultStatus> requestContext)
|
||||
{
|
||||
await RunWithErrorHandling(() => GetProject(requestParams.ProjectUri).NoneScripts.Delete(requestParams.Path!), requestContext);
|
||||
}
|
||||
|
||||
internal async Task HandleExcludeNoneScriptRequest(SqlProjectScriptParams requestParams, RequestContext<ResultStatus> requestContext)
|
||||
internal async Task HandleExcludeNoneItemRequest(SqlProjectScriptParams requestParams, RequestContext<ResultStatus> requestContext)
|
||||
{
|
||||
await RunWithErrorHandling(() => GetProject(requestParams.ProjectUri).NoneScripts.Exclude(requestParams.Path!), requestContext);
|
||||
}
|
||||
|
||||
internal async Task HandleMoveNoneScriptRequest(MoveItemParams requestParams, RequestContext<ResultStatus> requestContext)
|
||||
internal async Task HandleMoveNoneItemRequest(MoveItemParams requestParams, RequestContext<ResultStatus> requestContext)
|
||||
{
|
||||
await RunWithErrorHandling(() => GetProject(requestParams.ProjectUri).NoneScripts.Move(requestParams.Path, requestParams.DestinationPath), requestContext);
|
||||
}
|
||||
|
||||
@@ -190,12 +190,12 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.SqlProjects
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task TestNoneScriptOperations()
|
||||
public async Task TestNoneItemOperations()
|
||||
{
|
||||
// Setup
|
||||
SqlProjectsService service = new();
|
||||
string projectUri = await service.CreateSqlProject();
|
||||
Assert.AreEqual(0, service.Projects[projectUri].NoneScripts.Count, "Baseline number of NoneScripts");
|
||||
Assert.AreEqual(0, service.Projects[projectUri].NoneScripts.Count, "Baseline number of NoneItems");
|
||||
|
||||
// Validate adding a None script
|
||||
MockRequest<ResultStatus> requestMock = new();
|
||||
@@ -208,49 +208,49 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.SqlProjects
|
||||
|
||||
Assert.IsTrue(File.Exists(absolutePath), $"{absolutePath} expected to be on disk");
|
||||
|
||||
await service.HandleAddNoneScriptRequest(new SqlProjectScriptParams()
|
||||
await service.HandleAddNoneItemRequest(new SqlProjectScriptParams()
|
||||
{
|
||||
ProjectUri = projectUri,
|
||||
Path = relativePath
|
||||
}, requestMock.Object);
|
||||
|
||||
requestMock.AssertSuccess(nameof(service.HandleAddNoneScriptRequest));
|
||||
Assert.AreEqual(1, service.Projects[projectUri].NoneScripts.Count, "NoneScripts count after add");
|
||||
Assert.IsTrue(service.Projects[projectUri].NoneScripts.Contains(relativePath), $"NoneScripts expected to contain {relativePath}");
|
||||
requestMock.AssertSuccess(nameof(service.HandleAddNoneItemRequest));
|
||||
Assert.AreEqual(1, service.Projects[projectUri].NoneScripts.Count, "NoneItems count after add");
|
||||
Assert.IsTrue(service.Projects[projectUri].NoneScripts.Contains(relativePath), $"NoneItems expected to contain {relativePath}");
|
||||
|
||||
// Validate getting a list of the None scripts
|
||||
MockRequest<GetScriptsResult> getMock = new();
|
||||
await service.HandleGetNoneScriptsRequest(new SqlProjectParams()
|
||||
await service.HandleGetNoneItemsRequest(new SqlProjectParams()
|
||||
{
|
||||
ProjectUri = projectUri
|
||||
}, getMock.Object);
|
||||
|
||||
getMock.AssertSuccess(nameof(service.HandleGetNoneScriptsRequest));
|
||||
getMock.AssertSuccess(nameof(service.HandleGetNoneItemsRequest));
|
||||
Assert.AreEqual(1, getMock.Result.Scripts.Length);
|
||||
Assert.AreEqual(relativePath, getMock.Result.Scripts[0]);
|
||||
|
||||
// Validate excluding a None script
|
||||
requestMock = new();
|
||||
await service.HandleExcludeNoneScriptRequest(new SqlProjectScriptParams()
|
||||
await service.HandleExcludeNoneItemRequest(new SqlProjectScriptParams()
|
||||
{
|
||||
ProjectUri = projectUri,
|
||||
Path = relativePath
|
||||
}, requestMock.Object);
|
||||
|
||||
requestMock.AssertSuccess(nameof(service.HandleExcludeNoneScriptRequest));
|
||||
Assert.AreEqual(0, service.Projects[projectUri].NoneScripts.Count, "NoneScripts count after exclude");
|
||||
requestMock.AssertSuccess(nameof(service.HandleExcludeNoneItemRequest));
|
||||
Assert.AreEqual(0, service.Projects[projectUri].NoneScripts.Count, "NoneItems count after exclude");
|
||||
Assert.IsTrue(File.Exists(absolutePath), $"{absolutePath} expected to still exist on disk");
|
||||
|
||||
// Re-add to set up for Delete
|
||||
requestMock = new();
|
||||
await service.HandleAddNoneScriptRequest(new SqlProjectScriptParams()
|
||||
await service.HandleAddNoneItemRequest(new SqlProjectScriptParams()
|
||||
{
|
||||
ProjectUri = projectUri,
|
||||
Path = relativePath
|
||||
}, requestMock.Object);
|
||||
|
||||
requestMock.AssertSuccess(nameof(service.HandleAddNoneScriptRequest));
|
||||
Assert.AreEqual(1, service.Projects[projectUri].NoneScripts.Count, "NoneScripts count after re-add");
|
||||
requestMock.AssertSuccess(nameof(service.HandleAddNoneItemRequest));
|
||||
Assert.AreEqual(1, service.Projects[projectUri].NoneScripts.Count, "NoneItems count after re-add");
|
||||
|
||||
// Validate moving a None script
|
||||
string movedScriptRelativePath = @"SubPath\RenamedNoneIncludeFile.json";
|
||||
@@ -258,27 +258,27 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.SqlProjects
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(movedScriptAbsolutePath)!);
|
||||
|
||||
requestMock = new();
|
||||
await service.HandleMoveNoneScriptRequest(new MoveItemParams()
|
||||
await service.HandleMoveNoneItemRequest(new MoveItemParams()
|
||||
{
|
||||
ProjectUri = projectUri,
|
||||
Path = relativePath,
|
||||
DestinationPath = movedScriptRelativePath
|
||||
}, requestMock.Object);
|
||||
|
||||
requestMock.AssertSuccess(nameof(service.HandleMoveNoneScriptRequest));
|
||||
requestMock.AssertSuccess(nameof(service.HandleMoveNoneItemRequest));
|
||||
Assert.IsTrue(File.Exists(movedScriptAbsolutePath), "Script should exist at new location");
|
||||
Assert.AreEqual(1, service.Projects[projectUri].NoneScripts.Count, "NoneScripts count after move");
|
||||
Assert.AreEqual(1, service.Projects[projectUri].NoneScripts.Count, "NoneItems count after move");
|
||||
|
||||
// Validate deleting a None script
|
||||
requestMock = new();
|
||||
await service.HandleDeleteNoneScriptRequest(new SqlProjectScriptParams()
|
||||
await service.HandleDeleteNoneItemRequest(new SqlProjectScriptParams()
|
||||
{
|
||||
ProjectUri = projectUri,
|
||||
Path = movedScriptRelativePath
|
||||
}, requestMock.Object);
|
||||
|
||||
requestMock.AssertSuccess(nameof(service.HandleDeleteNoneScriptRequest));
|
||||
Assert.AreEqual(0, service.Projects[projectUri].NoneScripts.Count, "NoneScripts count after delete");
|
||||
requestMock.AssertSuccess(nameof(service.HandleDeleteNoneItemRequest));
|
||||
Assert.AreEqual(0, service.Projects[projectUri].NoneScripts.Count, "NoneItems count after delete");
|
||||
Assert.IsFalse(File.Exists(movedScriptAbsolutePath), $"{movedScriptAbsolutePath} expected to have been deleted from disk");
|
||||
}
|
||||
|
||||
@@ -840,6 +840,8 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.SqlProjects
|
||||
Assert.AreEqual(@"bin\Debug\", mock.Result.OutputPath); // default value is normalized to Windows slashes
|
||||
Assert.AreEqual("SQL_Latin1_General_CP1_CI_AS", mock.Result.DefaultCollation);
|
||||
Assert.IsNull(mock.Result.DatabaseSource, nameof(mock.Result.DatabaseSource)); // validate DatabaseSource is null when the tag isn't present
|
||||
Assert.AreEqual(ProjectType.SdkStyle, mock.Result.ProjectStyle);
|
||||
Assert.AreEqual("Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider", mock.Result.DatabaseSchemaProvider);
|
||||
|
||||
// Validate that DatabaseSource can be set when the tag doesn't exist
|
||||
|
||||
|
||||
Reference in New Issue
Block a user