| 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.action; | |
| 6 | |
| 7 /** The ways in which a call to a mock method can be handled. */ | |
| 8 class Action { | |
| 9 /** Do nothing (void method) */ | |
| 10 static const IGNORE = const Action._('IGNORE'); | |
| 11 | |
| 12 /** Return a supplied value. */ | |
| 13 static const RETURN = const Action._('RETURN'); | |
| 14 | |
| 15 /** Throw a supplied value. */ | |
| 16 static const THROW = const Action._('THROW'); | |
| 17 | |
| 18 /** Call a supplied function. */ | |
| 19 static const PROXY = const Action._('PROXY'); | |
| 20 | |
| 21 const Action._(this.name); | |
| 22 | |
| 23 final String name; | |
| 24 | |
| 25 String toString() => 'Action: $name'; | |
| 26 } | |
| OLD | NEW |