reset method

  1. @override
void reset({
  1. bool clearValue = true,
  2. bool clearArgs = true,
  3. bool clearCount = true,
})
inherited

Reverts all to the original values, so resets the call count, clears call args, and clears out any next calls.

Implementation

@override
void reset({
  bool clearValue = true,
  bool clearArgs = true,
  bool clearCount = true,
}) {
  if (clearValue) {
    value = originalValue;
  }

  if (clearCount) {
    callCount = 0;
  }

  if (clearArgs) {
    callArgs.clear();
  }
  _throwNextCall = false;
  _e = null;
  _returnNextCall = false;
  __returnNextValue = null;
}