Roslyn Source Generators allow us to generate code based on the current project code and additional files. This blog post by Gérald Barré goes in-depth on how to write a test to ensure that the incremental generation is working as expected. The post also includes sample code and explanations on how to retrieve diagnostic information using WithTrackingName, a feature that allows Roslyn to track diagnostic information about the pipeline.