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.
Inheritance
Inherited Members
Namespace: NUnit.Framework
Assembly: nunit.framework.dll
Syntax
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public abstract class CombiningStrategyAttribute : NUnitAttribute, ITestBuilder, IApplyToTest
Constructors
View SourceCombiningStrategyAttribute(ICombiningStrategy, IParameterDataProvider)
Construct a CombiningStrategyAttribute incorporating an ICombiningStrategy and an IParameterDataProvider.
Declaration
protected CombiningStrategyAttribute(ICombiningStrategy strategy, IParameterDataProvider provider)
Parameters
Type | Name | Description |
---|---|---|
ICombiningStrategy | strategy | Combining strategy to be used in combining data |
IParameterDataProvider | provider | An 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.
Declaration
protected CombiningStrategyAttribute(object strategy, object provider)
Parameters
Type | Name | Description |
---|---|---|
object | strategy | Combining strategy to be used in combining data |
object | provider | An IParameterDataProvider to supply data |
Methods
View SourceApplyToTest(Test)
Modify the test by adding the name of the combining strategy to the properties.
Declaration
public void ApplyToTest(Test test)
Parameters
Type | Name | Description |
---|---|---|
Test | test | The test to modify |
BuildFrom(IMethodInfo, Test?)
Builds any number of tests from the specified method and context.
Declaration
public IEnumerable<TestMethod> BuildFrom(IMethodInfo method, Test? suite)
Parameters
Type | Name | Description |
---|---|---|
IMethodInfo | method | The MethodInfo for which tests are to be constructed. |
Test | suite | The suite to which the tests will be added. |
Returns
Type | Description |
---|---|
IEnumerable<TestMethod> |