fitSharp
Subset Fixture
Subset Fixture compares an actual collection of objects to its table of expected values. It is the same as Array Fixture, except surplus objects in the actual collection are ignored, and order is not significant.

setup sample array
column acolumn b
ax
ay
by

Matching cells are marked.

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

sample subset
column acolumn b
ax
ay
by

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

Surplus rows and order are ignored.

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

sample subset
column acolumn b
by
ax

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

Mismatched cells and missing rows are reported.

when test is
story test fixture
checktest result
sample subset
column acolumn b
no
bz

sample subset
column acolumn b
n missingo
bz expected
y actual
At 0 expected z was y

sample subset
column acolumn b
no
bz
then result is
sample subset
column acolumn b
n missingo
bz expected
y actual
At 0 expected z was y
Copyright © 2022 Syterra Software Inc. All rights reserved.