Open sandboxFocus

Class CurrentDirectoryAttribute

An implementation of SyntaxAttribute that generates test cases from files in the current directory. To be used with [Theory]. This attribute will not include subdirectories that contain a file named _Runner.cs, nor subdirectories that are covered by another test method of the same class. It also takes into account the metalamaTests.config file.

Inheritance
DataAttribute
CurrentDirectoryAttribute
Namespace: Metalama.Testing.AspectTesting
Assembly: Metalama.Testing.AspectTesting.dll
Syntax
public sealed class CurrentDirectoryAttribute : DataAttribute

Constructors

Name Description
CurrentDirectoryAttribute(string?, string?)

Initializes a new instance of the CurrentDirectoryAttribute class.

Properties

Name Description
Directory

Gets the root directory of test files for the current test methods.

Methods

Name Description
GetData(MethodInfo)

Returns the data to be used to test the theory.