Dart DocumentationmockResponder

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).

class Responder {
 var value;
 Action action;
 int count;
 Responder(this.value, [this.count = 1, this.action = Action.RETURN]);
}

Constructors

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

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

Properties

Action action #

action

int count #

count

var value #

value