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) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
acfe29ee98
commit
f96161a664
@@ -1,6 +1,6 @@
|
|||||||
using Strata.SqlTools.Visitors.PostgreSql;
|
using Strata.SqlTools.Visitors.PostgreSql;
|
||||||
|
|
||||||
namespace Strata.SqlTools.PostgreSql.Tests.PostgreSql;
|
namespace Strata.SqlTools.SqlBreakdown.Tests.PostgreSql;
|
||||||
|
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class CommandVisitorTests
|
public class CommandVisitorTests
|
||||||
@@ -24,11 +24,10 @@ public class CommandVisitorTests
|
|||||||
{
|
{
|
||||||
var method = typeof(CommandVisitor).GetMethod(
|
var method = typeof(CommandVisitor).GetMethod(
|
||||||
"FormatParameterName",
|
"FormatParameterName",
|
||||||
System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public)
|
System.Reflection.BindingFlags.Instance
|
||||||
?? typeof(Strata.SqlTools.Visitors.SqlServer.CommandVisitor).GetMethod(
|
| System.Reflection.BindingFlags.NonPublic
|
||||||
"FormatParameterName",
|
| System.Reflection.BindingFlags.Public);
|
||||||
System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
|
Assert.That(method, Is.Not.Null, "FormatParameterName must exist as a protected override on CommandVisitor");
|
||||||
Assert.That(method, Is.Not.Null, "FormatParameterName must exist as a protected method on the visitor hierarchy");
|
|
||||||
return (string)method!.Invoke(visitor, new object[] { name })!;
|
return (string)method!.Invoke(visitor, new object[] { name })!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user