Introduces new unit tests for Snowflake and SQL Server-specific SQL breakdown
classes (DELETE, INSERT, UPDATE, PROCEDURE) and various general SQL utility
functions. This significantly increases test coverage, ensuring robustness
and correctness across different SQL dialects and helper logic.
- **NUnit2046 (15)**: extend the prior regex sweep to also catch the
`Is.GreaterThan(n)` / `Is.GreaterThanOrEqualTo(n)` variants on
`.Count` and `.Length` — the previous pass only handled `Is.EqualTo`.
Affects PG/Snowflake `QueryBreakdownTests`, PG `StatementReaderTests`,
`LinqToSql` `QueryComparatorTests` / `QueryValidatorTests`,
`Markdown.Tests` `ExpressionGeneratorTests` /
`QueryBreakdownGeneratorTests`, and `JsonTokenReaderTests`.
- **CS8604 (8)**: `merged[someKey]` access inside `Assert.Multiple(() =>
{ ... })` lambdas where `someKey` is `string?` from `FirstOrDefault`.
The preceding `Assert.That(someKey, Is.Not.Null)` does not propagate
null-narrowing into the lambda scope, so add `!` to the dictionary
index. (Tests fail loud with a meaningful message if the key really
is null, so this is safe.)
- **NUnit2045 (1)**: wrap a four-assert block in
`JsonTokenReaderTests.cs:65-68` in `Assert.Multiple`. Mirrors the
surrounding two `Assert.Multiple` groups in that method.
All 1180 tests stay green.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Re-runs `dotnet format analyzers --diagnostics NUnit2046 NUnit2045` after
the Tier 2 Assert.Multiple wrap, which exposed:
- `Has.Length.EqualTo(n)` rewrites for `string[]`/array `.Length` checks
(the first pass only knew about `.Count`).
- `Is.Not.Empty` rewrites for `Count, Is.GreaterThan(0)`.
- A handful of new NUnit2045 groups that became wrappable once the
initial Multiple blocks settled the surrounding indentation.
Tests still 1180/1180 passing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Driven by `dotnet format analyzers --diagnostics NUnit2045`. The fixer
groups consecutive independent `Assert.That(...)` calls into
`Assert.Multiple(() => { ... })`, so a failing assertion no longer
short-circuits the block — every failure inside the group is reported,
which gives much better diagnostics on multi-property tests.
Audit confirmed no Assert.Throws / Assert.Fail / Assert.Catch / Assert.Pass
/ Assert.DoesNotThrow got pulled inside a Multiple block (those need to
short-circuit). All 1180 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- NUnit2046: `Assert.That(x.Count, Is.EqualTo(n))` → `Assert.That(x, Has.Count.EqualTo(n))` (or `Is.Empty` when n==0)
- NUnit2011: `Assert.That(s.Contains(x))` → `Assert.That(s, Does.Contain(x))` for richer failure messages
- CA1866: `.StartsWith("$"|"@"|":")` → `.StartsWith('$'|'@'|':')` char overload
Driven by `dotnet format analyzers --diagnostics NUnit2046 NUnit2011 CA1866`
for the cases the Roslyn fixer handles, plus a regex sweep for the remaining
`Count == n` (n>0) cases which the fixer doesn't address. CA1866 had no
associated code fix and was edited by hand (3 sites in 2 files). All tests
green (1180 passing).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>