C# Class NUnit.Framework.Internal.TestFilter

Inheritance: ITestFilter
Show file Open project: nunit/nunit Class Usage Examples

Public Properties

Property Type Description
Empty TestFilter

Public Methods

Method Description
AddToXml ( TNode parentNode, bool recursive ) : TNode

Adds an XML node

FromXml ( TNode node ) : TestFilter

Create a TestFilter from it's TNode representation

FromXml ( string xmlText ) : TestFilter

Create a TestFilter instance from an xml representation.

IsExplicitMatch ( ITest test ) : bool

Determine if a test matches the filter explicitly. That is, it must be a direct match of the test itself or one of it's children.

Match ( ITest test ) : bool

Determine whether the test itself matches the filter criteria, without examining either parents or descendants. This is overridden by each different type of filter to perform the necessary tests.

MatchParent ( ITest test ) : bool

Determine whether any ancestor of the test matches the filter criteria

Pass ( ITest test ) : bool

Determine if a particular test passes the filter criteria. The default implementation checks the test itself, its parents and any descendants. Derived classes may override this method or any of the Match methods to change the behavior of the filter.

ToXml ( bool recursive ) : TNode

Adds an XML node

Protected Methods

Method Description
MatchDescendant ( ITest test ) : bool

Determine whether any descendant of the test matches the filter criteria.

Method Details

AddToXml() public abstract method

Adds an XML node
public abstract AddToXml ( TNode parentNode, bool recursive ) : TNode
parentNode TNode Parent node
recursive bool True if recursive
return TNode

FromXml() public static method

Create a TestFilter from it's TNode representation
public static FromXml ( TNode node ) : TestFilter
node TNode
return TestFilter

FromXml() public static method

Create a TestFilter instance from an xml representation.
public static FromXml ( string xmlText ) : TestFilter
xmlText string
return TestFilter

IsExplicitMatch() public method

Determine if a test matches the filter explicitly. That is, it must be a direct match of the test itself or one of it's children.
public IsExplicitMatch ( ITest test ) : bool
test ITest The test to which the filter is applied
return bool

Match() public abstract method

Determine whether the test itself matches the filter criteria, without examining either parents or descendants. This is overridden by each different type of filter to perform the necessary tests.
public abstract Match ( ITest test ) : bool
test ITest The test to which the filter is applied
return bool

MatchDescendant() protected method

Determine whether any descendant of the test matches the filter criteria.
protected MatchDescendant ( ITest test ) : bool
test ITest The test to be matched
return bool

MatchParent() public method

Determine whether any ancestor of the test matches the filter criteria
public MatchParent ( ITest test ) : bool
test ITest The test to which the filter is applied
return bool

Pass() public method

Determine if a particular test passes the filter criteria. The default implementation checks the test itself, its parents and any descendants. Derived classes may override this method or any of the Match methods to change the behavior of the filter.
public Pass ( ITest test ) : bool
test ITest The test to which the filter is applied
return bool

ToXml() public method

Adds an XML node
public ToXml ( bool recursive ) : TNode
recursive bool True if recursive
return TNode

Property Details

Empty public static property

Unique Empty filter.
public static TestFilter,NUnit.Framework.Internal Empty
return TestFilter