Class CombiningStrategyAttribute
Marks a test as using a particular CombiningStrategy to join any supplied parameter data. Since this is the default, the attribute is optional.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public abstract class CombiningStrategyAttribute : NUnitAttribute, ITestBuilder, IApplyToTest
- Inheritance
-
CombiningStrategyAttribute
- Implements
- Derived
- Inherited Members
Constructors
CombiningStrategyAttribute(ICombiningStrategy, IParameterDataProvider)
Construct a CombiningStrategyAttribute incorporating an ICombiningStrategy and an IParameterDataProvider.
protected CombiningStrategyAttribute(ICombiningStrategy strategy, IParameterDataProvider provider)
Parameters
strategy
ICombiningStrategyCombining strategy to be used in combining data
provider
IParameterDataProviderAn IParameterDataProvider to supply data
CombiningStrategyAttribute(object, object)
Construct a CombiningStrategyAttribute incorporating an object that implements ICombiningStrategy and an IParameterDataProvider. This constructor is provided for CLS compliance.
protected CombiningStrategyAttribute(object strategy, object provider)
Parameters
strategy
objectCombining strategy to be used in combining data
provider
objectAn IParameterDataProvider to supply data
Methods
ApplyToTest(Test)
Modify the test by adding the name of the combining strategy to the properties.
public void ApplyToTest(Test test)
Parameters
test
TestThe test to modify
BuildFrom(IMethodInfo, Test?)
Builds any number of tests from the specified method and context.
public IEnumerable<TestMethod> BuildFrom(IMethodInfo method, Test? suite)
Parameters
method
IMethodInfoThe MethodInfo for which tests are to be constructed.
suite
TestThe suite to which the tests will be added.