A base class for xUnit test classes that run snapshot tests of Metalama aspects.
Namespace: Metalama.Testing.AspectTesting
Assembly: Metalama.Testing.AspectTesting.dll
Syntax
[Obsolete("This class is obsolete. Use the default snapshot test project setup provided by Metalama.Testing.AspectTesting instead.")]
public abstract class AspectTestClassRemarks
This class provides infrastructure for running snapshot tests using xUnit. Test methods must follow these conventions:
- Annotate with both
[Theory]and CurrentDirectoryAttribute - Have a single parameter accepting the relative path of the test file
- Call RunTestAsync(string, CancellationToken, string?) as their only implementation
Test files can include special comments (e.g., // @ReportOutputWarnings) to configure test behavior.
See TestOptions for available options.
Constructors
| Name | Description |
|---|---|
| AspectTestClass(ITestOutputHelper) |
Methods
| Name | Description |
|---|---|
| GetDirectory(string) | |
| RunTestAsync(string, CancellationToken, string?) | Executes a test. |