Skip to content

Commit

Permalink
Add unit test for True/False wrapper logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jas88 committed Oct 16, 2024
1 parent a82b535 commit 41fa7d6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tests/FAnsiTests/Query/QuerySyntaxHelperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,18 @@ public void Test_GetAlias(DatabaseType t)
});
}

[TestCaseSource(typeof(All), nameof(All.DatabaseTypes))]
public void Test_BooleanWrapper(DatabaseType dbType)
{
Assert.Multiple(() =>
{
var syntaxHelper = ImplementationManager.GetImplementation(dbType).GetQuerySyntaxHelper();
Assert.That(syntaxHelper.True, Is.EqualTo(dbType == DatabaseType.PostgreSql ? "TRUE" : "1"));
Assert.That(syntaxHelper.False, Is.EqualTo(dbType == DatabaseType.PostgreSql ? "FALSE" : "0"));
});
}

[TestCaseSource(typeof(All),nameof(All.DatabaseTypes))]
public void Test_NameValidation(DatabaseType dbType)
{
Expand Down

0 comments on commit 41fa7d6

Please sign in to comment.