-
Notifications
You must be signed in to change notification settings - Fork 158
IParameterDataSource Interface
The IParameterDataSource
interface is implemented by attributes that provide data for use as an argument to a single paramerter. Other attributes and test builders combine the values in various ways to produce test cases.
The interface is defined as follows:
public interface IParameterDataSource
{
IEnumerable GetData(IParameterInfo parameter);
}
IParameterInfo
is an NUnit internal class used to wrap a ParameterInfo
. See the source code for more info.
A custom attribute implementing this interface should examine the IParameterInfo
and return data values that are compatible with the parameter. The attribute has no control over how this data is combined with other arguments - that's up to other attributes and ultimately NUnit itself.
The following NUnit attributes currently implement IParameterDataSource
:
RandomAttribute
-
ValuesAttribute
, with the derived classRangeAttribute
ValueSourceAttribute
Copyright (c) 2018 The NUnit Project - Licensed under CC BY-NC-SA 4.0
-
NUnit
-
Release Notes
-
License
- Getting Started
- Writing Tests
- Running Tests
- Extending NUnit
- Technical Notes
-
Release Notes
- NUnit Xamarin Runners
- VS Test Adapter
- VS Test Generator
- NUnit Analyzers