`await That(result.Diagnostics.Any(d => d.Contains("AWT101"))).IsTrue()` collapses the diagnostics to a bool before the assertion sees them, so a failure reports only `expected true, but it was false` and says nothing about what the generator actually produced. Asserting on the collection instead keeps the diagnostics in the failure message:
```
Expected that result.Diagnostics
contains "*AWT999*" as wildcard at least once,
but it did not contain it
Collection:
[
"(9,2): error AWT101: 'MyCode.Service' cannot be resolved: 'MyCode.Service' requires 'MyCode.IMissing…"
]
```
Converts all 192 sites across 55 files: `.IsTrue()` becomes `Contains("*AWT101*").AsWildcard()` and `.IsFalse()` becomes `DoesNotContain("*AWT101*").AsWildcard()`.
Two shapes needed more than a mechanical rewrite. Three predicates combining terms with `&&` flatten to an ordered wildcard (`d.Contains("AWT120") && d.Contains("Repository") && d.Contains("Connection")` becomes `"*AWT120*Repository*Connection*"`); `&&` is order-independent and a wildcard is not, so these tightened slightly, and they pass. Three `.IsFalse()` predicates combining terms with `||` split into two `DoesNotContain` assertions each, since negating a disjunction distributes over both terms.
No behavioral change: the same 586 tests pass before and after.
await That(result.Diagnostics.Any(d => d.Contains("AWT101"))).IsTrue()collapses the diagnostics to a bool before the assertion sees them, so a failure reports onlyexpected true, but it was falseand says nothing about what the generator actually produced. Asserting on the collection instead keeps the diagnostics in the failure message:Converts all 192 sites across 55 files:
.IsTrue()becomesContains("*AWT101*").AsWildcard()and.IsFalse()becomesDoesNotContain("*AWT101*").AsWildcard().Two shapes needed more than a mechanical rewrite. Three predicates combining terms with
&&flatten to an ordered wildcard (d.Contains("AWT120") && d.Contains("Repository") && d.Contains("Connection")becomes"*AWT120*Repository*Connection*");&&is order-independent and a wildcard is not, so these tightened slightly, and they pass. Three.IsFalse()predicates combining terms with||split into twoDoesNotContainassertions each, since negating a disjunction distributes over both terms.No behavioral change: the same 586 tests pass before and after.