ecl-logo Documentation

FieldComparisonTest

FieldComparisonTest[packet,fields,comparator]test

returns a test to be used in RunUnitTest that runs only if none of the contents of fields are Null, automatically passing otherwise.

Details

    Input
    Output

Examples

Basic Examples  (3)

Generate an EmeraldTest Object on an Packet that should pass due the first supplied Field being less than the second:

Generate an EmeraldTest Object on an Packet that should fail due to the first supplied Field NOT being greater than the second:

Generate an EmeraldTest Object on an Packet that should pass by default due to one of the supplied fields being Null:

Additional Examples  (1)

Any number of fields (>= 2) can be compared at once:

Messages  (2)

InvalidComparison  (1)

If the contents of the provided fields are not Null but also cannot be compared, a failing test is returned:

InvalidFields  (1)

If any of the provided fields do not exist in the provided Object, a failing test is returned: