An xUnit data attribute that generates test cases from all snapshot test files in the current project.
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 sealed class CurrentProjectAttribute : DataAttributeRemarks
Use this attribute with [Theory] to automatically discover all test files (*.cs) in the project
and generate a test case for each file. Unlike CurrentDirectoryAttribute, this attribute
discovers files across the entire project rather than a specific directory.
The attribute excludes:
- Subdirectories that contain a file named
_Runner.cs(which indicates a separate test class) - Files marked with
// @Skippeddirective
Test discovery respects options from metalamaTests.json configuration files.
Constructors
| Name | Description |
|---|---|
| CurrentProjectAttribute() |
Methods
| Name | Description |
|---|---|
| GetData(MethodInfo) | Returns the data to be used to test the theory. |