Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/DacpacTool/SqlRuleProblemExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SqlServer.Dac.CodeAnalysis;

Expand Down
6 changes: 4 additions & 2 deletions test/DacpacTool.Tests/PackageAnalyzerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public class PackageAnalyzerTests
private const string SuppressionFileNameMixedCaseRuleIds = "StaticCodeAnalysis.SuppressMessages.mixed-rule-id-casing.xml";
// IDE0330: keep object here because this test project also targets net8.0.
private static readonly object SuppressionFileLock = new();
private static readonly string[] AnalysisFailureErrors = ["proc1.sql(1,1): Error SR9999: Analyzer failed."];
private static readonly string[] AnalysisFailureWarnings = ["proc1.sql(1,1): Warning SRD0006 : Should not be written."];
private readonly IConsole _console = new TestConsole();

[TestMethod]
Expand Down Expand Up @@ -341,9 +343,9 @@ public void WriteAnalysisResults_WhenAnalysisFails_WritesErrorsAndFailureMessage
method!.Invoke(packageAnalyzer, new object[]
{
outputFile,
new[] { "proc1.sql(1,1): Error SR9999: Analyzer failed." },
AnalysisFailureErrors,
false,
new[] { "proc1.sql(1,1): Warning SRD0006 : Should not be written." },
AnalysisFailureWarnings,
new Action(() => serialized = true)
});

Expand Down
13 changes: 7 additions & 6 deletions test/DacpacTool.Tests/PackageDeployerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ namespace MSBuild.Sdk.SqlProj.DacpacTool.Tests
public class PackageDeployerTests
{
private static readonly string[] AllowDropBlockingAssemblies = ["AllowDropBlockingAssemblies=True"];
private static readonly string[] CaseInsensitiveNamesProperties =
[
"createNewDatabase=True",
"COMMANDTIMEOUT=77",
"dOnOtDrOpObJeCtTyPeS=Assemblies,Rules"
];
private readonly IConsole _console = Substitute.For<IConsole>();

[TestMethod]
Expand Down Expand Up @@ -197,12 +203,7 @@ public void SetPropertyCaseInsensitiveNames()
var packageDeployer = new PackageDeployer(_console);

// Act
packageDeployer.SetDeployProperties(new[]
{
"createNewDatabase=True",
"COMMANDTIMEOUT=77",
"dOnOtDrOpObJeCtTyPeS=Assemblies,Rules"
});
packageDeployer.SetDeployProperties(CaseInsensitiveNamesProperties);

// Assert
packageDeployer.DeployOptions.CreateNewDatabase.ShouldBeTrue();
Expand Down
Loading