The symbol save operator can be used in any expected value cell. Instead of comparing the actual value to an expected value, the actual value is saved with the symbol name.
when input is⇓ | 'sample class' set field something check field >>mysymbol set field null check field >>nullsymbol | then output is |
|
The symbol recall operator can be used in any input or expected value cell. The value used will be the last value saved with the symbol name.
when input is⇓ | 'sample class' set field something check field <<mysymbol set field null check field <<nullsymbol set field <<mysymbol check field something set field <<nullsymbol check field null | then output is |
|
We can save any value in a symbol, e.g. a byte array.
when input is⇓ | 'sample class' set bytes 0x010203 check bytes >>bytesymbol check bytes <<bytesymbol | then output is |
|
Symbol values can also be assigned with the Name Keyword and the Configure Fixture and used with the Use Fixture and With Keyword.
Symbols can be erased with the Clear Symbols Fixture.
We can also get and set symbol values in fixture code:
if (Symbols.HasValue("stuff")) { var mySymbol = Symbols.GetValue("stuff); } Symbols.Save("another") = "one";Notes:
This is a separate feature from the FitNesse wiki symbol feature.