OLD | NEW |
| (Empty) |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | |
2 // for details. All rights reserved. Use of this source code is governed by a | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 library mock.responder; | |
6 | |
7 import 'action.dart'; | |
8 | |
9 /** | |
10 * The behavior of a method call in the mock library is specified | |
11 * with [Responder]s. A [Responder] has a [value] to throw | |
12 * or return (depending on the type of [action]), | |
13 * and can either be one-shot, multi-shot, or infinitely repeating, | |
14 * depending on the value of [count (1, greater than 1, or 0 respectively). | |
15 */ | |
16 class Responder { | |
17 final Object value; | |
18 final Action action; | |
19 int count; | |
20 Responder(this.value, [this.count = 1, this.action = Action.RETURN]); | |
21 } | |
OLD | NEW |