|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
IAnswer.java | - | - | - | - |
|
1 | /* | |
2 | * Copyright (c) 2001-2006 OFFIS, Tammo Freese. | |
3 | * This program is made available under the terms of the MIT License. | |
4 | */ | |
5 | package org.easymock; | |
6 | ||
7 | /** | |
8 | * Used to answer expected calls. | |
9 | * @param <T> the type to return. | |
10 | */ | |
11 | public interface IAnswer<T> { | |
12 | /** | |
13 | * is called by EasyMock to answer an expected call. | |
14 | * The answer may be to return a value, or to throw an exception. | |
15 | * The arguments of the call for which the answer is generated | |
16 | * are available via {@link EasyMock#getCurrentArguments()} - be careful | |
17 | * here, using the arguments is not refactoring-safe. | |
18 | * | |
19 | * @return the value to be returned | |
20 | * @throws Throwable the throwable to be thrown | |
21 | */ | |
22 | T answer() throws Throwable; | |
23 | } |
|