Class ProtoTable

Namespace
ProtoTest.Sheets
Assembly
ProtoTest.Sheets.dll

A header-aware view of a sheet area. Header rows can be layered - a merged group header over subheaders - and a column is addressed by its full header path; a single segment matches when it is unambiguous, and ambiguity fails with the candidate paths instead of guessing.

public sealed class ProtoTable
Inheritance
ProtoTable
Inherited Members
Extension Methods

Properties

ColumnCount

public int ColumnCount { get; }

Property Value

int

DataStartRow

The first row that holds data.

public int DataStartRow { get; }

Property Value

int

HeaderRows

The rows the headers were read from.

public IReadOnlyList<int> HeaderRows { get; }

Property Value

IReadOnlyList<int>

Headers

One header path per column, top level first.

public IReadOnlyList<IReadOnlyList<string>> Headers { get; }

Property Value

IReadOnlyList<IReadOnlyList<string>>

RowCount

public int RowCount { get; }

Property Value

int

Rows

public IReadOnlyList<ProtoTableRow> Rows { get; }

Property Value

IReadOnlyList<ProtoTableRow>

Should

The positive assertions of this table, for example Should.ContainRow("Region", "EMEA").

public ProtoTableAssertions Should { get; }

Property Value

ProtoTableAssertions

ShouldNot

The negated assertions of this table, for example ShouldNot.ContainRow("Region", "NOPE").

public ProtoTableAssertions ShouldNot { get; }

Property Value

ProtoTableAssertions

Methods

Column(params string[])

Finds the column whose header path matches; a single segment matches by suffix.

public ProtoColumn Column(params string[] headerPath)

Parameters

headerPath string[]

Returns

ProtoColumn

RowWhere(IReadOnlyList<string>, string)

Finds the row where a header path holds a value.

public ProtoTableRow RowWhere(IReadOnlyList<string> keyHeaderPath, string value)

Parameters

keyHeaderPath IReadOnlyList<string>
value string

Returns

ProtoTableRow

RowWhere(string, string)

Finds the row where one column holds a value, for example the EMEA row.

public ProtoTableRow RowWhere(string keyColumn, string value)

Parameters

keyColumn string
value string

Returns

ProtoTableRow