mirrors library

Classes

Mock
Extend or mixin this class to mark the implementation as a Mock. [...]
PostExpectation
VerificationResult

Properties

any → dynamic
An argument matcher that matches any argument passed in "this" position.
read-only
captureAny → dynamic
An argument matcher that matches any argument passed in "this" position, and captures the argument for later access with captured.
read-only
untilCalled → InvocationLoader
Returns a future Invocation that will complete upon the first occurrence of the given invocation. [...]
read-only
verify Verification
Verify that a method on a mock object was called with the given arguments. [...]
read-only
verifyInOrder → _InOrderVerification
read-only
verifyNever Verification
Verify that a method on a mock object was never called with the given arguments. [...]
read-only
when Expectation
Create a stub method response. [...]
read-only

Functions

argThat(Matcher matcher) → dynamic
An argument matcher that matches an argument that matches matcher.
captureThat(Matcher matcher) → dynamic
An argument matcher that matches an argument that matches matcher, and captures the argument for later access with captured.
clearInteractions(dynamic mock) → void
Clear the collected interactions with mock.
logInvocations(List<Mock> mocks) → void
Print all collected invocations of any mock methods of mocks.
named(dynamic mock, { String name, int hashCode }) → dynamic
reset(dynamic mock) → void
Clear stubs of, and collected interactions with mock.
resetMockitoState() → void
Reset the state of Mockito, typically for use between tests. [...]
spy<E>(Mock mock, E spyOn) → E
Sets the default response of mock to be delegated to spyOn. [...]
throwOnMissingStub(Mock mock) → void
Opt-into Mock throwing NoSuchMethodError for unimplemented methods. [...]
typed<T>(ArgMatcher matcher, { String named }) → T
A Strong-mode safe argument matcher that wraps other argument matchers. See the README for a full explanation.
verifyNoMoreInteractions(dynamic mock) → void
verifyZeroInteractions(dynamic mock) → void

Typedefs

Answering(Invocation realInvocation) → dynamic
Expectation(dynamic x) PostExpectation
Verification(dynamic matchingInvocations) VerificationResult