Table of Contents

Class UIFactAttribute

Namespace
Xunit
Assembly
Xunit.StaFact.dll

Identifies an xunit test that starts on a UI thread-like SynchronizationContext such that awaited expressions resume on the test's "main thread". On Windows, the test runs on an STA thread.

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

Constructors

UIFactAttribute(string?, int)

Initializes a new instance of the UIFactAttribute class.

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

Parameters

sourceFilePath string
sourceLineNumber int