Class ProtoTableRowAssertions

Namespace
ProtoTest.Sheets
Assembly
ProtoTest.Sheets.dll

The assertions of one untyped table row, reached through Should. Shape has no negated form, so the facade is positive-only. MatchShape(object, JsonSerializerOptions?) returns the row, so assertions chain.

public sealed class ProtoTableRowAssertions
Inheritance
ProtoTableRowAssertions
Inherited Members
Extension Methods

Methods

MatchShape(object, bool, JsonSerializerOptions?)

Matches the row against an expected shape exactly: a column of the row that the shape does not mention is a mismatch naming the column, so the row cannot carry a value the test never asserted. A value constraint mentions its whole subtree. Returns the row.

public ProtoTableRow MatchShape(object expectedShape, bool exact, JsonSerializerOptions? options = null)

Parameters

expectedShape object
exact bool
options JsonSerializerOptions

Returns

ProtoTableRow

MatchShape(object, JsonSerializerOptions?)

Matches the row against an expected shape and traces the assertion. The shape is keyed by each column's leaf header name and each value is the cell's rendered value (an empty cell is null); a table whose columns share a leaf name fails instead of guessing. A mismatch is rethrown as a SpreadsheetAssertionException whose message starts with the row's Sheet!Range, with the matcher exception as the inner exception. Returns the row.

public ProtoTableRow MatchShape(object expectedShape, JsonSerializerOptions? options = null)

Parameters

expectedShape object
options JsonSerializerOptions

Returns

ProtoTableRow