fitSharp
Array Fixture

Array Fixture compares an actual collection of objects to its table of expected values. The second row of the table is a header row containing the member names to be checked in the actual objects. The order of rows is significant in the comparison.

story test fixture

An unmatched object in the actual collection is shown as surplus.
setup sample array
column a
a
b
c

checktest result
sample array
column a
a
c
sample array
column a
a
c
b surplus

An unmatched row in the expected values is marked as missing.
setup sample array
column a
a
c

checktest result
sample array
column a
a
b
c
sample array
column a
a
b missing
c

Both surplus and missing rows are handled.
setup sample array
column a
a
d
c

checktest result
sample array
column a
a
b
c
sample array
column a
a
b missing
c
d surplus

Duplicate rows are matched correctly.
setup sample array
column a
a
a
c

checktest result
sample array
column a
a
a
c
sample array
column a
a
a
c

Encoded text is handled.
setup sample array
column a
<stuff>

checktest result
sample array
column a
sample array
column a
<stuff> surplus

© Copyright Syterra Software Inc. All rights reserved.