Class XunitFilters
Represents the ability to track query filters or simple filters. Any attempt to add a mix of the two will result in an exception.
public class XunitFilters : ITestCaseFilter
- Inheritance
-
XunitFilters
- Implements
- Inherited Members
Properties
Empty
Gets a flag indicating whether there are any active filters.
public bool Empty { get; }
Property Value
Methods
AddExcludedClassFilter(string)
Adds a simple filter which excludes a fully qualified class name.
public void AddExcludedClassFilter(string query)
Parameters
querystring
Remarks
The query may begin and/or end with * to add as a wildcard. No other wildcards
are permitted in any other locations.
AddExcludedMethodFilter(string)
public void AddExcludedMethodFilter(string query)
Parameters
querystring
AddExcludedNamespaceFilter(string)
public void AddExcludedNamespaceFilter(string query)
Parameters
querystring
AddExcludedTraitFilter(string, string)
public void AddExcludedTraitFilter(string name, string value)
Parameters
AddIncludedClassFilter(string)
Adds a simple filter matching a fully qualified class name.
public void AddIncludedClassFilter(string query)
Parameters
querystring
Remarks
The query may begin and/or end with * to add as a wildcard. No other wildcards
are permitted in any other locations.
AddIncludedMethodFilter(string)
public void AddIncludedMethodFilter(string query)
Parameters
querystring
AddIncludedNamespaceFilter(string)
public void AddIncludedNamespaceFilter(string query)
Parameters
querystring
AddIncludedTraitFilter(string, string)
public void AddIncludedTraitFilter(string name, string value)
Parameters
AddQueryFilter(string)
Adds a query filter.
public void AddQueryFilter(string query)
Parameters
querystring
Remarks
For more information on the query syntax, see https://xunit.net/docs/query-filter-language
Filter(string, ITestCaseMetadata)
Determines whether the given testCase passes the filter.
public bool Filter(string assemblyName, ITestCaseMetadata testCase)
Parameters
assemblyNamestringThe simple assembly name without file extension
testCaseITestCaseMetadataThe test case to be checked against the filter
Returns
ToXunit3Arguments()
Gets the command-line arguments to pass to an xUnit.net v3 test assembly to perform the filtering contained within this filter.
public IReadOnlyCollection<string> ToXunit3Arguments()