depth property

int depth
final

The number of times the failing subject was nested from the root subject.

Indicates how far the "Actual: " and "Which: " lines from the Rejection should be indented so that they are at the same level of indentation as the label for the subject where the expectation failed.

For example, if a List is expected to and have a certain length expected may be:

a List that: has length that: equals <3>

If the actual value had an incorrect length, the depth will be 1 to indicate that the failure occurred checking one of the expectations against the has length label.

Implementation

final int depth;