verify top-level property

VerificationResult Function<T>(T matchingInvocations) verify

Verify that a method on a mock object was called with the given arguments.

Call a method on a mock object within the call to verify. For example:


Mockito will fail the current test case if cat.eatFood has not been called with "fish". Optionally, call called on the result, to verify that the method was called a certain number of times. For example:


Note: When mockito verifies a method call, said call is then excluded from further verifications. A single method call cannot be verified from multiple calls to verify, or verifyInOrder. See more details in the FAQ.

Note: because of an unintended limitation, verify(...).called(0); will not work as expected. Please use verifyNever(...); instead.

See also: verifyNever, verifyInOrder, verifyZeroInteractions, and verifyNoMoreInteractions.


Verification get verify => _makeVerify(false);