Table of Contents

Constructor TheoryAttribute

Namespace
Xunit
Assembly
xunit.v3.core.dll

TheoryAttribute(string?, int)

Marks a test method as being a data theory. Data theories are tests which are fed various bits of data from a data source, mapping to parameters on the test method. If the data source contains multiple rows, then the test method is executed multiple times (once with each data row). Data is provided by attributes which implement IDataAttribute (most commonly, InlineDataAttribute and MemberDataAttribute).

public TheoryAttribute(string? sourceFilePath = null, int sourceLineNumber = -1)

Parameters

sourceFilePath string
sourceLineNumber int