Skip to content

Commit 1ba2839

Browse files
committed
Attempt to plug coverage hole.
1 parent 27af5a2 commit 1ba2839

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

PSql.Tests/Tests.Unit/NewSqlContextCommandTests.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright Subatomix Research Inc.
22
// SPDX-License-Identifier: MIT
33

4+
using PSql.Commands;
5+
46
namespace PSql.Tests.Unit;
57

68
using Case = TestCaseData;
@@ -824,5 +826,19 @@ public void Frozen_Override_Valid(string expression, bool value)
824826
.ShouldOutput(context);
825827
}
826828

829+
#endregion
830+
#region Other
831+
832+
[Test]
833+
public void ApplyParameterValue_UnrecognizedParameter()
834+
{
835+
var before = new SqlContext();
836+
var after = new SqlContext();
837+
838+
new NewSqlContextCommand().ApplyParameterValue(after, "Unrecognized");
839+
840+
after.ShouldBe(before, StructuralEqualityComparer.Instance);
841+
}
842+
827843
#endregion
828844
}

PSql/Commands/NewSqlContextCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ protected override void ProcessRecord()
207207
WriteObject(context);
208208
}
209209

210-
private void ApplyParameterValue(SqlContext context, string parameterName)
210+
internal void ApplyParameterValue(SqlContext context, string parameterName)
211211
{
212212
switch (parameterName)
213213
{

0 commit comments

Comments
 (0)