Class FactAttribute
- Namespace
- Xunit
- Assembly
- xunit.v3.core.dll
Attribute that is applied to a method to indicate that it is a fact that should be run by the default test runner.
[XunitTestCaseDiscoverer(typeof(FactDiscoverer))]
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class FactAttribute : Attribute, IFactAttribute
- Inheritance
-
FactAttribute
- Implements
- Derived
- Inherited Members
Properties
- DisplayName
Gets the name of the test to be used when the test is skipped. When
nullis returned, will cause a default display name to be used.
- Explicit
Gets a flag which indicates whether the test should only be run explicitly. An explicit test is skipped by default unless explicit tests are requested to be run.
- Skip
Gets the skip reason for the test. When
nullis returned, the test is not skipped.
- SkipExceptions
Gets exceptions that, when thrown, will cause the test to be skipped rather than failed.
- SkipType
Gets the type to retrieve SkipUnless or SkipWhen from. If not set, then the property will be retrieved from the unit test class.
- SkipUnless
Gets the name of a public static property on the test class which returns
boolto indicate whether the test should be skipped (false) or not (true).
- SkipWhen
Gets the name of a public static property on the test class which returns
boolto indicate whether the test should be skipped (true) or not (false).
- Timeout
Gets the timeout for test (in milliseconds). When
0is returned, the test will not have a timeout.