MockableFunctionOf<T> class
Methods
-
call([List? args, Map<String, dynamic>? namedArgs])
→ T
-
Returns the mocked value.
args and namedArgs should be provided if
the mocked function takes arguments.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
pause({T? pausedValue, bool respectNextCall = false})
→ void
-
Pauses incrementing the call count. Call args will not be recorded. The
default value will be used unless
pausedValue is provided.
inherited
-
reset({bool clearValue = true, bool clearArgs = true, bool clearCount = true})
→ void
-
Reverts all to the original values, so resets the call count, clears call
args, and clears out any next calls.
inherited
-
resume()
→ void
-
Resumes incrementing the call count after pausing.
inherited
-
returnNextCall(T value)
→ void
-
The next time this function is called, return
value. It will return
to the original value after the next call is made.
inherited
-
throwNextCall([Exception? e])
→ void
-
The next time this function is called, throw
e. If e is not provided,
this will throw 'Mocked exception'.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited