Dart API ReferenceunittestResponder

Responder Class

The behavior of a method call in the mock library is specified with Responders. A Responder has a value to throw or return (depending on the type of action), and can either be one-shot, multi-shot, or infinitely repeating, depending on the value of [count (1, greater than 1, or 0 respectively).

Constructors

Code new Responder(value, [int count = 1, Action action = Action.RETURN]) #

Responder(this.value, [this.count = 1, this.action = Action.RETURN]);

Fields

Code Action action #

Action action;

Code int count #

int count;

Code var value #

var value;