DataPointProviders (NUnit 2.5)
Purpose
DataPointProviders are used to supply data for an individual parameter of a parameterized test method.
Extension Point
Addins use the host to access this extension point by name:
IExtensionPoint listeners = host.GetExtensionPoint( "DataPointProviders" );
Interface
The extension object passed to Install must implement the IDataPointProvider interface:
public interface IDataPointProvider { bool HasDataFor( ParameterInfo parameter ); IEnumerable GetDataFor( ParameterInfo parameter ); }
The HasDataFor method should return true if the provider is able to supply data for the specified parameter. If a provider only wants to be used on certain types of tests, it can examine the supplied ParameterInfo and its associated MethodInfo and Type.
The GetDataFor method should return a list of individual values to use for the supplied parameter in running the test.