Skip to content

Passing arguments to class constructor #3265

@silkfire

Description

@silkfire

I'm new to TUnit, but after reading the documentation quite thoroughly, I couldn't really find a way to achieve this.

How do I pass custom per-test class arguments to the constructor of a class data source?

Either to [ClassConstructorAttribute<T>] or [ClassDataSource<T>].

E.g. I want to provide a special string tag to my class that is related to the test class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions