Namespace ProtoTest.Sheets

Classes

ColumnAttribute

Binds one record property to a header path, for example [Column("FY26", "Amount")]. A key-value model declares its labels with LabelAttribute instead.

LabelAttribute

Binds one key-value model property to a label, for example [Label("Total")]. The label must appear exactly once in the sheet's first column; the value under it is read from the second column. A table model declares its columns with ColumnAttribute instead.

ProtoCell

One cell. Values are typed best-effort from the OpenXML cell type and number format: text, number, boolean or date, with the formula text kept alongside its cached value. Assertions are traced and fail with the sheet, reference, expected and actual value.

ProtoCellAssertions

The Should/ShouldNot surface of a cell. Each check is implemented once and its polarity is fixed by the property that produced this facade, so a negative failure reads "Expected ... not to ..." and carries the same evidence as the positive one.

ProtoColumn

A table column: its header path and its data cells.

ProtoColumnAssertions

The Should/ShouldNot surface of a table column. The comparison is written once and runs with the polarity of the property that produced this facade.

ProtoExecutionContextExtensions
ProtoHostBuilderExtensions
ProtoKeyValueEntryAssertions<TValue>

The Should/ShouldNot surface of one key-value entry. The comparison is the cell assertion's own, so an entry asserts exactly like the cell it reads, and the failure names the label beside the cell.

ProtoKeyValueEntry<TValue>

One label/value entry of a key-value sheet: the label the sheet carries, the value converted to the model's property type, and the assertions. Should compares with the cell assertion's own rules, text ordinals, numbers within 1e-6 and dates within a second.

ProtoKeyValueModelAssertions<TModel>

The assertions of one key-value model, reached through Should; each member returns the model, so assertions chain.

ProtoKeyValueModel<TModel>

A sheet modelled as label/value pairs: [Sheet("Summary", Kind = ProtoSheetKind.KeyValue)] names the sheet and [Label("Total")] declares one label per property. Labels are read from the sheet's first column and values from the second; a missing or duplicated label fails the read naming the labels the sheet carries, so tests read typed values without repeating label strings.

ProtoModelColumnAssertions<TValue>

The Should/ShouldNot surface of a typed model column. The comparison is written once and runs with the polarity of the property that produced this facade.

ProtoModelColumn<TValue>

A typed model column with property-style assertions over its values.

ProtoRange

A rectangular range of cells, row-major, with shape assertions.

ProtoRangeAssertions

The Should/ShouldNot surface of a range. Each check is written once and runs with the polarity of the property that produced this facade.

ProtoSheet

One sheet. Reading a cell or range records a sheets.range observation, which is what the coverage collector aggregates: coverage is the ranges the test actually read, not what the file has.

ProtoSheetModelAssertions<TRow>

The assertions of one record model, reached through Should and ShouldNot; each member returns the model, so assertions chain.

ProtoSheetModel<TRow>

A sheet modelled as a record: [Sheet] and [Column] declare the layout once, the model verifies it, and tests read typed rows and columns without repeating header paths. Rows are constructed through the record's primary constructor, so its guards run; ProtoSheetModel<TRow> remains the escape hatch for shapes a record cannot hold.

ProtoSheets

Entry point for opening generated workbooks.

ProtoTable

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.

ProtoTableAssertions

The Should/ShouldNot surface of a table. The row lookup runs once and the polarity of the property that produced this facade decides whether finding the row passes or fails.

ProtoTableRow

One data row of a table, addressable by header path (or a single unambiguous segment).

ProtoTableRowAssertions

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.

ProtoWorkbook

An opened workbook. Reading is eager and complete: tests assert on values, so a missing sheet or reference must fail with a clear message rather than a lazy parser error later.

SheetAttribute

Declares which sheet of the workbook a model binds to, its shape, and where its headers live.

SheetModelAssertions

Row-level shape assertions for record models and table rows. A row serializes with its property names (record models) or its leaf header names (table rows) and is matched by the same ProtoShapeAssertion the protocol integrations use. A model row traces on the ambient Context; a table row traces on the context its table carries, so a row asserted from a helper flow that does not see the ambient context still lands under the owning test.

SheetsCoverageCollector

Aggregates the ranges a test read as sheet coverage: one item per Sheet!A1:C10.

SheetsOptions

Spreadsheet choices, layered from ProtoTest:Sheets.

SpreadsheetAssertionException

A spreadsheet assertion failed; the message names the sheet, reference and actual value.

Enums

ProtoSheetKind

The shape a modelled sheet has: a table of header rows, or a block of label/value pairs.

ProtoSortDirection

The direction a column is expected to be sorted in.