C# Class PclUnit.Style.Xunit.DataAttribute

Inheritance: System.Attribute
Afficher le fichier Open project: jbtule/PclUnit

Méthodes publiques

Méthode Description
GetData ( MethodInfo methodUnderTest, Type parameterTypes ) : IEnumerable

Returns the data to be used to test the theory.

The parameterTypes parameter is provided so that the test data can be converted to the destination parameter type when necessary. Generally, data should NOT be automatically converted, UNLESS the source data format does not have rich types (for example, all numbers in Excel spreadsheets are returned as Double even if they are integers). Derivers of this class should NOT throw exceptions for mismatched types or mismatched number of parameters; the test framework will throw these exceptions at the correct time.

Method Details

GetData() public abstract méthode

Returns the data to be used to test the theory.
The parameterTypes parameter is provided so that the test data can be converted to the destination parameter type when necessary. Generally, data should NOT be automatically converted, UNLESS the source data format does not have rich types (for example, all numbers in Excel spreadsheets are returned as Double even if they are integers). Derivers of this class should NOT throw exceptions for mismatched types or mismatched number of parameters; the test framework will throw these exceptions at the correct time.
public abstract GetData ( MethodInfo methodUnderTest, Type parameterTypes ) : IEnumerable
methodUnderTest System.Reflection.MethodInfo The method that is being tested
parameterTypes System.Type The types of the parameters for the test method
Résultat IEnumerable