DatapointAttribute / DatapointsAttribute (NUnit 2.5)

The Datapoint and Datapoints attributes are used to provide data for Theories and are ignored for normal parameterized tests.

When a Theory is loaded, NUnit creates arguments for each of its parameters by using any fields of the same type as the parameter annotated with the DatapointAttribute. In addition, elements of arrays of the required type annotated with the DatapointsAttribute are also used.

Note: In the final release of NUnit 2.5, NUnit will automatically supply values of true and false for boolean arguments and will supply all possible values of any enum argument. For beta-2, this is not yet implemented.

For an example of use, see TheoryAttribute.

See also...