From f96161a664fd70f5912672bc176c1fad7a4d0b00 Mon Sep 17 00:00:00 2001 From: Thom Lamb Date: Tue, 19 May 2026 16:39:31 -0500 Subject: [PATCH] test(pgsql): align CommandVisitorTests namespace and drop dead fallback Code review follow-up on acfe29e: - Switch namespace to Strata.SqlTools.SqlBreakdown.Tests.PostgreSql to match the dominant convention in the sibling test folder. - Remove the unreachable SqlServer.CommandVisitor fallback in the reflection helper. The Assert.That guard alone is enough to surface a future regression. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../PostgreSql/CommandVisitorTests.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/Strata.SqlTools.PostgreSql.Tests/PostgreSql/CommandVisitorTests.cs b/tests/Strata.SqlTools.PostgreSql.Tests/PostgreSql/CommandVisitorTests.cs index 46c3c5d..1b3896a 100644 --- a/tests/Strata.SqlTools.PostgreSql.Tests/PostgreSql/CommandVisitorTests.cs +++ b/tests/Strata.SqlTools.PostgreSql.Tests/PostgreSql/CommandVisitorTests.cs @@ -1,6 +1,6 @@ using Strata.SqlTools.Visitors.PostgreSql; -namespace Strata.SqlTools.PostgreSql.Tests.PostgreSql; +namespace Strata.SqlTools.SqlBreakdown.Tests.PostgreSql; [TestFixture] public class CommandVisitorTests @@ -24,11 +24,10 @@ public class CommandVisitorTests { var method = typeof(CommandVisitor).GetMethod( "FormatParameterName", - System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public) - ?? typeof(Strata.SqlTools.Visitors.SqlServer.CommandVisitor).GetMethod( - "FormatParameterName", - System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); - Assert.That(method, Is.Not.Null, "FormatParameterName must exist as a protected method on the visitor hierarchy"); + System.Reflection.BindingFlags.Instance + | System.Reflection.BindingFlags.NonPublic + | System.Reflection.BindingFlags.Public); + Assert.That(method, Is.Not.Null, "FormatParameterName must exist as a protected override on CommandVisitor"); return (string)method!.Invoke(visitor, new object[] { name })!; } }