verifyZeroInteractions function Null safety

void verifyZeroInteractions(
  1. dynamic mock
)

Ensure interactions never happened on a mock.

Implementation

void verifyZeroInteractions(dynamic mock) {
  if (mock is Mock) {
    if (mock._realCalls.isNotEmpty) {
      fail(
        '''No interaction expected, but following found: ${mock._realCalls.join()}''',
      );
    }
  } else {
    _throwMockArgumentError('verifyZeroInteractions', mock);
  }
}