MetalamaAPI documentationAdvanced APIMetalama.​Testing.​Aspect­TestingTest­ScenarioPreview­Code­Fix
Open sandboxFocus

TestScenario.PreviewCodeFix Field

This value indicates that a code fix preview should be applied. When this value is set, the output buffer of the test is not the one transformed by the aspect, but the one transformed by the code fix. The test will fail if it does not generate any diagnostic with a code fix. By default, the first emitted code fix is applied. To apply a different code fix, use the AppliedCodeFixIndex property. To enable this option in a test, add this comment to your test file: // @TestScenario(PreviewCodeFix).

Namespace: Metalama.Testing.AspectTesting
Assembly: Metalama.Testing.AspectTesting.dll
public const TestScenario PreviewCodeFix
Type Description