fitSharp
Array Fixture Mismatches

Array Fixture marks mismatched cells.

An unmatched row in the expected values is marked as missing.

setup sample array
column acolumn b
ax
ay
by

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

sample array
column acolumn b
extra missingone
ax
ay
by

sample array
column acolumn b
extraone
ax
ay
by
then result is
sample array
column acolumn b
extra missingone
ax
ay
by

An unmatched object in the actual collection is shown as surplus.

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

sample array
column acolumn b
ax
by
a surplus y

sample array
column acolumn b
ax
by
then result is
sample array
column acolumn b
ax
by
a surplus y

Rows out of order are reported.

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

sample array
column acolumn b
a out of ordery
b out of ordery
a out of orderx

sample array
column acolumn b
ay
by
ax
then result is
sample array
column acolumn b
a out of ordery
b out of ordery
a out of orderx

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

sample array
column acolumn b
b out of ordery
ay
a out of orderx

sample array
column acolumn b
by
ay
ax
then result is
sample array
column acolumn b
b out of ordery
ay
a out of orderx

Both surplus and missing rows are handled.

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

sample array
column acolumn b
ax
m missings
by
a surplus y

sample array
column acolumn b
ax
ms
by
then result is
sample array
column acolumn b
ax
m missings
by
a surplus y

Encoded text is handled.

setup sample array
column acolumn b
<great><stuff>

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

sample array
column acolumn b
<great> surplus <stuff>

sample array
column acolumn b
then result is
sample array
column acolumn b
<great> surplus <stuff>

Closest match is used.

setup sample array
column acolumn b
ab

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

sample array
column acolumn b
ax expected
b actual
At 0 expected x was b

sample array
column acolumn b
ax
then result is
sample array
column acolumn b
ax expected
b actual
At 0 expected x was b

setup sample array
column acolumn b
ax
ab

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

sample array
column acolumn b
ab
a surplus x

sample array
column acolumn b
ab
then result is
sample array
column acolumn b
ab
a surplus x

Copyright © 2022 Syterra Software Inc. All rights reserved.