Show / Hide Table of Contents

Class FactAttribute

Attribute that is applied to a method to indicate that it is a fact that should be run by the test runner. It can also be extended to support a customized definition of a test method.

Inheritance
Object
FactAttribute
TheoryAttribute
Namespace: Xunit
Assembly: xunit.core.dll
Syntax
public class FactAttribute : Attribute

Properties

| Improve this Doc View Source

DisplayName

Gets the name of the test to be used when the test is skipped. Defaults to null, which will cause the fully qualified test name to be used.

Declaration
public virtual string DisplayName { get; set; }
Property Value
Type Description
String
| Improve this Doc View Source

Skip

Marks the test so that it will not be run, and gets or sets the skip reason

Declaration
public virtual string Skip { get; set; }
Property Value
Type Description
String
| Improve this Doc View Source

Timeout

Marks the test as having a timeout, and gets or sets the timeout (in milliseconds). WARNING: Using this with parallelization turned on will result in undefined behavior. Timeout is only supported when parallelization is disabled, either globally or with a parallelization-disabled test collection.

Declaration
public virtual int Timeout { get; set; }
Property Value
Type Description
Int32
  • Improve this Doc
  • View Source
Back to top Generated by DocFX