xUnit.net
Public Member Functions | Properties | List of all members
Xunit.ClassDataAttribute Class Reference

Provides a data source for a data theory, with the data coming from a class which must implement IEnumerable<object[]>. Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets. More...

Inheritance diagram for Xunit.ClassDataAttribute:
Xunit.Sdk.DataAttribute

Public Member Functions

 ClassDataAttribute (Type @class)
 Initializes a new instance of the ClassDataAttribute class. More...
 
override IEnumerable< object[]> GetData (MethodInfo testMethod)
 Returns the data to be used to test the theory.
 

Properties

Type Class [get]
 Gets the type of the class that provides the data. More...
 
- Properties inherited from Xunit.Sdk.DataAttribute
virtual string Skip [get, set]
 Marks all test cases generated by this data source as skipped. More...
 

Detailed Description

Provides a data source for a data theory, with the data coming from a class which must implement IEnumerable<object[]>. Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets.

Constructor & Destructor Documentation

◆ ClassDataAttribute()

Xunit.ClassDataAttribute.ClassDataAttribute ( Type @  class)
inline

Initializes a new instance of the ClassDataAttribute class.

Parameters
classThe class that provides the data.

Property Documentation

◆ Class

Type Xunit.ClassDataAttribute.Class
get

Gets the type of the class that provides the data.


The documentation for this class was generated from the following file: