GeneratorTestContextBuilder renders every ResolvedFixes entry's TextChanges from the first applied fix when a single document carries more than one diagnostic of the same rule. Each entry gets the correct CodeAction.Title, but they all report the same edit.
Two tests work around this today rather than asserting through it:
test/CodeFixes.Tests/Usages/Rsa3002FixTests.cs — GivenSource_WhenCodeFix_ThenVerify is [Theory(Skip = "Verify output seems odd.")]
test/CodeFixes.Tests/Design/Rsa2011FixTests.cs — GivenTypeAndMember_WhenCodeFix_ThenEachDeclaresItsOwnDefault asserts only the action titles, with a comment pointing at this limitation
The RSA2011 case is the clearer illustration. A type in a namespace defaults to internal and a member of a type to private, so one document with both produces two fixes inserting different text. The titles come back correct (Declare 'internal' explicitly, Declare 'private' explicitly) but both entries report internal as the inserted text. The fix itself is correct — single-diagnostic snapshots confirm internal class and private void respectively — so this is a harness reporting problem, not a product bug.
Worth either fixing in Rocket.Surgery.Extensions.Testing.SourceGenerators or documenting as intended, so these two tests can assert the real output and the skip can come off.
GeneratorTestContextBuilderrenders everyResolvedFixesentry'sTextChangesfrom the first applied fix when a single document carries more than one diagnostic of the same rule. Each entry gets the correctCodeAction.Title, but they all report the same edit.Two tests work around this today rather than asserting through it:
test/CodeFixes.Tests/Usages/Rsa3002FixTests.cs—GivenSource_WhenCodeFix_ThenVerifyis[Theory(Skip = "Verify output seems odd.")]test/CodeFixes.Tests/Design/Rsa2011FixTests.cs—GivenTypeAndMember_WhenCodeFix_ThenEachDeclaresItsOwnDefaultasserts only the action titles, with a comment pointing at this limitationThe RSA2011 case is the clearer illustration. A type in a namespace defaults to
internaland a member of a type toprivate, so one document with both produces two fixes inserting different text. The titles come back correct (Declare 'internal' explicitly,Declare 'private' explicitly) but both entries reportinternalas the inserted text. The fix itself is correct — single-diagnostic snapshots confirminternal classandprivate voidrespectively — so this is a harness reporting problem, not a product bug.Worth either fixing in
Rocket.Surgery.Extensions.Testing.SourceGeneratorsor documenting as intended, so these two tests can assert the real output and the skip can come off.