in lib/src/mock.dart [962:992]
Verification _makeVerify(bool never) {
if (_verifyCalls.isNotEmpty) {
var message = 'Verification appears to be in progress.';
if (_verifyCalls.length == 1) {
message =
'$message One verify call has been stored: ${_verifyCalls.single}';
} else {
message =
'$message ${_verifyCalls.length} verify calls have been stored. '
'[${_verifyCalls.first}, ..., ${_verifyCalls.last}]';
}
throw StateError(message);
}
if (_verificationInProgress) {
fail('There is already a verification in progress, '
'check if it was not called with a verify argument(s)');
}
_verificationInProgress = true;
return <T>(T mock) {
_verificationInProgress = false;
if (_verifyCalls.length == 1) {
var verifyCall = _verifyCalls.removeLast();
var result = VerificationResult._(verifyCall.matchingInvocations.length,
verifyCall.matchingCapturedArgs);
verifyCall._checkWith(never);
return result;
} else {
fail('Used on a non-mockito object');
}
};
}