TestWrapperMixin class

Full documentation: https://www.ezflap.io/testing/mock/mock.html#log-function-calls

This mixin offers some utility functions that can be used by mocks to keep track of invocations of the mocked service's methods.

Constructors

TestWrapperMixin()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
tw_getExtraOfLastInvocation([String? key]) String?
Retrieve the extra text that was provided to tw_logInvocation in the last invocation that was recorded with key. If key is null - return the extra of the last invocation of any key.
tw_getParam(String key, int paramIdx) → dynamic
Retrieve a parameter that was recorded with the last invocation that was recorded with key.
tw_logInvocation(String key, {String? extra, List? arrParams}) → void
Log a method invocation.
tw_reset() → void
Clear the log of invocations that have been recorded so far for this instance.
tw_wasInvoked({String? key, int? atLeastNumTimes, int? atMostNumItems, int? exactlyNumTimes}) bool
Check whether a method was invoked at least, at most, or exactly a given number of times.

Operators

operator ==(Object other) bool
The equality operator.
inherited