Skip to content

Commit 3b44253

Browse files
committed
Increase coverage.
1 parent 7dd185f commit 3b44253

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

PSql.Engine.Tests/SqlCmdPreprocessorTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ public void SetVariables_EntryHasEmptyKey()
5252
TestSetVariablesWith(entry: new DictionaryEntry("", "value"));
5353
}
5454

55+
[Test]
56+
public void SetVariables_EntryHasNullValue()
57+
{
58+
TestSetVariablesWith(entry: new DictionaryEntry("a", null));
59+
}
60+
5561
private static void TestSetVariablesWith(object entry)
5662
{
5763
var preprocessor = new SqlCmdPreprocessor();

PSql.Engine/SqlCmdPreprocessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public bool EnableVariableReplacementInComments
3434
/// </param>
3535
public void SetVariables(IDictionary? entries)
3636
{
37-
if (entries == null)
37+
if (entries is null)
3838
return;
3939

4040
var variables = _preprocessor.Variables;

0 commit comments

Comments
 (0)