Table of Contents

Class ValueMatchFilter<T>

Namespace
NUnit.Framework.Internal.Filters
Assembly
nunit.framework.dll

ValueMatchFilter selects tests based on some value, which is expected to be contained in the test.

public abstract class ValueMatchFilter<T> : TestFilter, ITestFilter

Type Parameters

T

The Type of the value

Inheritance
ValueMatchFilter<T>
Implements
Derived
Inherited Members

Constructors

ValueMatchFilter()

Construct an empty ValueMatchFilter

public ValueMatchFilter()

ValueMatchFilter(IEnumerable<T>)

Construct a ValueMatchFilter for multiple values

public ValueMatchFilter(IEnumerable<T> values)

Parameters

values IEnumerable<T>

The set of values the filter will recognize.

ValueMatchFilter(T)

Construct a ValueMatchFilter for a single value.

public ValueMatchFilter(T value)

Parameters

value T

The value to be included.

Properties

Values

Return a list of the values matched by the filter - used for testing

public IList<T> Values { get; }

Property Value

IList<T>

Methods

Add(T)

Add a single value to the filter

public void Add(T value)

Parameters

value T

The value to be added.

Match(ITest)

Check whether the filter matches a test

public override bool Match(ITest test)

Parameters

test ITest

The test to be matched

Returns

bool

True if it matches, otherwise false

Match(ITest, T)

Match a test against a single value.

protected abstract bool Match(ITest test, T value)

Parameters

test ITest
value T

Returns

bool