| Index: pkg/mock/lib/src/responder.dart
|
| diff --git a/pkg/mock/lib/src/responder.dart b/pkg/mock/lib/src/responder.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ef0dd716838cae0a5ec7db86bca81e01465f01d8
|
| --- /dev/null
|
| +++ b/pkg/mock/lib/src/responder.dart
|
| @@ -0,0 +1,21 @@
|
| +// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +library mock.responder;
|
| +
|
| +import 'action.dart';
|
| +
|
| +/**
|
| + * The behavior of a method call in the mock library is specified
|
| + * with [Responder]s. 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 {
|
| + final Object value;
|
| + final Action action;
|
| + int count;
|
| + Responder(this.value, [this.count = 1, this.action = Action.RETURN]);
|
| +}
|
|
|