fitSharp
Array Fixture Matches
Array Fixture marks the matching cells.

setup sample array
column acolumn b
ax
ay
by

when test is
story test fixture
checktest result
sample array
column acolumn b
ax
ay
by

sample array
column acolumn b
ax
ay
by

sample array
column acolumn b
ax
ay
by
then result is
sample array
column acolumn b
ax
ay
by

An array fixture can also use a .NET DataTable as its actual values.

when test is
story test fixture
checktest result
sample table array
column acolumn b
ax
ay
by

sample table array
column acolumn b
ax
ay
by

sample table array
column acolumn b
ax
ay
by
then result is
sample table array
column acolumn b
ax
ay
by

The actual values can be a list of different types.

when test is
story test fixture
checktest result
sample mixed array
column acolumn b
ax
ay
by

sample mixed array
column acolumn b
ax
ay
by

sample mixed array
column acolumn b
ax
ay
by
then result is
sample mixed array
column acolumn b
ax
ay
by

The values can be any types that can be parsed and compared.

setup sample array
motherfather
Jill SpratJack Sprat
Millie MuffetRoger Muffet

when test is
story test fixture
checktest result
sample array
motherfather
Jill SpratJack Sprat
Millie MuffetRoger Muffet

sample array
motherfather
Jill SpratJack Sprat
Millie MuffetRoger Muffet

sample array
motherfather
Jill SpratJack Sprat
Millie MuffetRoger Muffet
then result is
sample array
motherfather
Jill SpratJack Sprat
Millie MuffetRoger Muffet

An empty list is matched.

setup sample array
column acolumn b

when test is
story test fixture
checktest result
sample array
column acolumn b

sample array
column acolumn b

sample array
column acolumn b
then result is
sample array
column acolumn b

The actual value types can have different methods. Empty cells in the expected values are used when a particular column heading is not applicable.

setup sample array
column acolumn bother
ax
ay
by
some

when test is
story test fixture
checktest result
sample array
column acolumn bother
ax
ay
byextra
some

sample array
column acolumn bother
ax
ay
byextra expected
void actual
some

sample array
column acolumn bother
ax
ay
byextra
some
then result is
sample array
column acolumn bother
ax
ay
byextra expected
void actual
some

Duplicate rows are matched correctly.

setup sample array
column acolumn b
ax
ax
by

when test is
story test fixture
checktest result
sample array
column acolumn b
ax
ax
by

sample array
column acolumn b
ax
ax
by

sample array
column acolumn b
ax
ax
by
then result is
sample array
column acolumn b
ax
ax
by

Copyright © 2022 Syterra Software Inc. All rights reserved.