Class FixtureAttribute
Represents the base class for test fixture attributes.
public abstract class FixtureAttribute : BaseAttribute, IFixtureBuilder2, IFixtureBuilder
- Inheritance
-
FixtureAttribute
- Implements
-
IFixtureBuilder2IFixtureBuilder
- Derived
- Inherited Members
Constructors
FixtureAttribute()
protected FixtureAttribute()
Methods
BuildFrom(ITypeInfo)
Build one or more TestFixtures from type provided. At least one non-null TestSuite must always be returned, since the method is generally called because the user has marked the target class as a fixture. If something prevents the fixture from being used, it will be returned nonetheless, labelled as non-runnable.
public virtual IEnumerable<TestSuite> BuildFrom(ITypeInfo typeInfo)
Parameters
typeInfo
ITypeInfoThe type info of the fixture to be used.
Returns
- IEnumerable<TestSuite>
A TestSuite object or one derived from TestSuite.
BuildFrom(ITypeInfo, IPreFilter)
Builds any number of test fixtures from the specified type.
public IEnumerable<TestSuite> BuildFrom(ITypeInfo typeInfo, IPreFilter filter)
Parameters
typeInfo
ITypeInfoThe type info of the fixture to be used.
filter
IPreFilterPreFilter to be used to select methods.
Returns
- IEnumerable<TestSuite>
A list of test suites.