Class TheoryDataBase<TTheoryDataRow, TRawDataRow>
- Namespace
- Xunit
- Assembly
- xunit.v3.core.dll
Provides a base type for theories based on collection initialization syntax.
public abstract class TheoryDataBase<TTheoryDataRow, TRawDataRow> : IReadOnlyCollection<TTheoryDataRow>, IEnumerable<TTheoryDataRow>, IEnumerable where TTheoryDataRow : class, ITheoryDataRow
Type Parameters
TTheoryDataRowThe type of the theory data row (must implement ITheoryDataRow).
TRawDataRowThe raw data row that requires conversion to
TTheoryDataRow.
- Inheritance
-
TheoryDataBase<TTheoryDataRow, TRawDataRow>
- Implements
-
IReadOnlyCollection<TTheoryDataRow>IEnumerable<TTheoryDataRow>
- Derived
- Inherited Members
Properties
Count
public int Count { get; }
Property Value
Methods
Add(TTheoryDataRow)
Adds a row to the theory.
public void Add(TTheoryDataRow row)
Parameters
rowTTheoryDataRowThe row of data to be added.
Add(TRawDataRow)
Adds a row to the theory.
public void Add(TRawDataRow row)
Parameters
rowTRawDataRowThe row of data to be added.
AddRange(IEnumerable<TTheoryDataRow>)
Adds multiple rows to the theory.
public void AddRange(IEnumerable<TTheoryDataRow> rows)
Parameters
rowsIEnumerable<TTheoryDataRow>The rows of data to be added.
AddRange(IEnumerable<TRawDataRow>)
Adds multiple rows to the theory.
public void AddRange(IEnumerable<TRawDataRow> rows)
Parameters
rowsIEnumerable<TRawDataRow>The rows of data to be added.
AddRange(params TTheoryDataRow[])
Adds multiple rows to the theory.
public void AddRange(params TTheoryDataRow[] rows)
Parameters
rowsTTheoryDataRow[]The rows of data to be added.
AddRange(params TRawDataRow[])
Adds multiple rows to the theory.
public void AddRange(params TRawDataRow[] rows)
Parameters
rowsTRawDataRow[]The rows of data to be added.
Convert(TRawDataRow)
Convert untyped values into the appropriate theory data row.
protected abstract TTheoryDataRow Convert(TRawDataRow row)
Parameters
rowTRawDataRowThe raw data row
Returns
- TTheoryDataRow
GetEnumerator()
public IEnumerator<TTheoryDataRow> GetEnumerator()
Returns
- IEnumerator<TTheoryDataRow>