fitSharp
Compare List
The Compare List operator compares lists to expected values in nested tables.

when test is
story test fixture
checktest result
nested lists

checknested
nameelements
apple
idcountsubelements
a1
ab
xy
xz
b2
ab
xxZZ
orange
id
c
pear
idcount

nested lists

checknested
nameelements
apple
idcountsubelements
a1
ab
xy
xz
b2
ab
xxZZ
orange
id
c
pear
idcount

nested lists

checknested
nameelements
apple
idcountsubelements
a1
ab
xy
xz
b2
ab
xxZZ
orange
id
c
pear
idcount
then result is
nested lists

checknested
nameelements
apple
idcountsubelements
a1
ab
xy
xz
b2
ab
xxZZ
orange
id
c
pear
idcount

An empty actual list matches an empty expected cell.

when test is
story test fixture
checktest result
nested lists

checknested
nameelements
apple
idcount
a1
b2
orange
id
c
pear

nested lists

checknested
nameelements
apple
idcount
a1
b2
orange
id
c
pear System.Collections.ArrayList

nested lists

checknested
nameelements
apple
idcount
a1
b2
orange
id
c
pear
then result is
nested lists

checknested
nameelements
apple
idcount
a1
b2
orange
id
c
pear System.Collections.ArrayList

An empty actual list matches an empty nested table in an expected cell.

when test is
story test fixture
checktest result
nested lists

checknested
nameelements
apple
idcount
a1
b2
orange
id
c
pear
x

nested lists

checknested
nameelements
apple
idcount
a1
b2
orange
id
c
pear
x

nested lists

checknested
nameelements
apple
idcount
a1
b2
orange
id
c
pear
x
then result is
nested lists

checknested
nameelements
apple
idcount
a1
b2
orange
id
c
pear
x

Mismatches and errors are reported.

when test is
story test fixture
checktest result
nested lists

checknested
nameelements
apple
identitycount
a1
orange
id
d
pear
idcount
a1

nested lists

checknested
nameelements
apple
identity
Column 'identity' not used.
count
a expected
void actual
1
surplus 2
orange
id
d missing
c surplus
pear
idcount
a missing1

nested lists

checknested
nameelements
apple
identitycount
a1
orange
id
d
pear
idcount
a1
then result is
nested lists

checknested
nameelements
apple
identity
Column 'identity' not used.
count
a expected
void actual
1
surplus 2
orange
id
d missing
c surplus
pear
idcount
a missing1

The report when an embedded table is missing isn't so good. But how to decide whether to put the List into a table? And what labels? And whether to include embedded tables to some depth?

when test is
story test fixture
checktest result
nested lists

checknested
nameelements
orange
id
c
pear

nested lists

checknested
nameelements
orange
id
c
pear System.Collections.ArrayList
apple surplus System.Collections.ArrayList

nested lists

checknested
nameelements
orange
id
c
pear
then result is
nested lists

checknested
nameelements
orange
id
c
pear System.Collections.ArrayList
apple surplus System.Collections.ArrayList
Copyright © 2022 Syterra Software Inc. All rights reserved.