fitSharp
Cell Matching

Fixtures may compare expected values provided in cells to actual values provided by the system under test.

CellMatching
actual typeactual valueexpected valuematches
stringaaaaaaTruea string is equal to expected
stringaaabbbFalsea string is not equal to expected
int55Truea number is equal to expected
int56Falsea number is not equal to expected
int5xxxExceptiona number doesn't match an invalid value

Special symbols and keywords can be used in the expected value cells.

Numbers can use comparison operators.
CellMatching
actual typeactual valueexpected valuematches
int5>4True
int5>5False
int5>=4True
int5>=5True
int5>=6False
decimal4.999999999999999999999<5Truecomparisons work for decimals
decimal5<5False
double.9999999999E-18<=1E-18Trueand for doubles
double1E-18<=1E-18True
double1.0000000000001E-18<=1E-18False
int5Exceptioncomparison fails with an invalid value
string5>4Falsecomparison operators are only for numbers
byte5>4Truehere's the other valid types for comparisons
sbyte5>4True
float5.0>4.0True
uint5>4True
long5>4True
ulong5>4True
short5>4True
ushort5>4True

Numeric comparisons can be combined with symbol recall.
CellMatching
actual typeactual valueexpected valuematchesexpected cell
int3><<fourFalse<span class="fit_grey">3 </span>&gt;&lt;&lt;four<span class="fit_grey"> 4</span>symbol values can be recalled for comparison
int3< <<fourTrue<span class="fit_grey">3 </span>&lt; &lt;&lt;four<span class="fit_grey"> 4</span>use whitespace to disambiguate 'less than' and 'recall'
int3'<<four'False&lt;&lt;four<span class="fit_grey"> 4</span>this is recall, not a comparison

When a cell match fails, the Cell Differences are displayed.
Copyright © 2022 Syterra Software Inc. All rights reserved.