Show / Hide Table of Contents

Class ClassDataAttribute

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.

Inheritance
Object
DataAttribute
ClassDataAttribute
Inherited Members
DataAttribute.Skip
Namespace: Xunit
Assembly: xunit.core.dll
Syntax
public class ClassDataAttribute : DataAttribute

Constructors

| Improve this Doc View Source

ClassDataAttribute(Type)

Initializes a new instance of the ClassDataAttribute class.

Declaration
public ClassDataAttribute(Type class)
Parameters
Type Name Description
Type class

The class that provides the data.

Properties

| Improve this Doc View Source

Class

Gets the type of the class that provides the data.

Declaration
public Type Class { get; }
Property Value
Type Description
Type

Methods

| Improve this Doc View Source

GetData(MethodInfo)

Declaration
public override IEnumerable<object[]> GetData(MethodInfo testMethod)
Parameters
Type Name Description
MethodInfo testMethod
Returns
Type Description
IEnumerable<Object[]>
Overrides
DataAttribute.GetData(MethodInfo)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX