C# Класс PclUnit.Style.Xunit.DataAttribute

Наследование: System.Attribute
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

GetData() публичный абстрактный Метод

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
Результат IEnumerable