beNull method

K beNull()

Asserts that the object is not null

Implementation

K beNull() {
  if (isReversed) {
    Execute.assertion
        .forCondition(subject == null)
        .failWith('\nExpected $subjectLabel not to be <null>.');
  } else {
    Execute.assertion.forCondition(subject != null).failWith(
          '\nExpected $subjectLabel to be\n    <null>\nbut found\n    `${subject.runtimeType}` (Hashcode=${subject.hashCode})',
        );
  }

  return copy(subject, subjectLabel: _subjectLabel);
}