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

TestScenario.ApplyCodeFix Field

This value indicates that a code fix 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 set this scenario in a test, add this comment to your test file: // @TestScenario(ApplyCodeFix).

Namespace: Metalama.Testing.AspectTesting
Assembly: Metalama.Testing.AspectTesting.dll
Syntax
public const TestScenario ApplyCodeFix
Returns
Type Description
TestScenario