Table of Contents

Class WinFormsTheoryAttribute

Namespace
Xunit
Assembly
Xunit.StaFact.dll

Identifies an xunit theory that starts on an STA thread with a WindowsFormsSynchronizationContext. Tests will be Skipped on non-Windows operating systems.

[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
[XunitTestCaseDiscoverer(typeof(WinFormsTheoryDiscoverer))]
public class WinFormsTheoryAttribute : TheoryAttribute, _Attribute, ITheoryAttribute, IFactAttribute
Inheritance
FactAttribute
TheoryAttribute
WinFormsTheoryAttribute
Implements
ITheoryAttribute
IFactAttribute
Inherited Members
TheoryAttribute.DisableDiscoveryEnumeration
TheoryAttribute.SkipTestWithoutData
FactAttribute.DisplayName
FactAttribute.Explicit
FactAttribute.Skip
FactAttribute.SkipExceptions
FactAttribute.SkipType
FactAttribute.SkipUnless
FactAttribute.SkipWhen
FactAttribute.SourceFilePath
FactAttribute.SourceLineNumber
FactAttribute.Timeout

Constructors

WinFormsTheoryAttribute(string?, int)

Initializes a new instance of the WinFormsTheoryAttribute class.

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

Parameters

sourceFilePath string
sourceLineNumber int