Open sandboxFocus

Class TestLiveTemplateAttribute

An attribute used in LiveTemplate and LiveTemplatePreview tests to mark the declaration to which an aspect should be applied as a live template.

Inheritance
TestLiveTemplateAttribute
Namespace: Metalama.Testing.AspectTesting
Assembly: Metalama.Testing.AspectTesting.dll
Syntax
[AttributeUsage(AttributeTargets.All)]
public class TestLiveTemplateAttribute : Attribute
Remarks

In live template test scenarios, this attribute simulates the user selecting a declaration in the IDE's refactoring context menu and applying an aspect to it. The attribute specifies which aspect type should be applied.

To use this attribute, set the // @TestScenario(LiveTemplate) or // @TestScenario(LiveTemplatePreview) comment in your test file, then apply this attribute to the target declaration.

Constructors

Name Description
TestLiveTemplateAttribute(Type)

Properties

Name Description
AspectType

Extension Methods

See Also