|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
Stub.java | - | - | - | - |
|
1 |
/* Copyright (c) 2000-2003, jMock.org. See bundled LICENSE.txt */
|
|
2 |
package org.jmock;
|
|
3 |
|
|
4 |
import org.jmock.dynamic.Invocation;
|
|
5 |
|
|
6 |
/**
|
|
7 |
* An object that stubs the behaviour of a method invocation on behalf of an
|
|
8 |
* {@link org.jmock.dynamic.Invokable} object.
|
|
9 |
*/
|
|
10 |
public interface Stub { |
|
11 |
/**
|
|
12 |
* Processes the invocation.
|
|
13 |
*
|
|
14 |
* @param invocation The invocation to stub.
|
|
15 |
* @return The result of the invocation, if not throwing an exception.
|
|
16 |
* Must return <code>null</code> if the invocation is of a method with a void return type.
|
|
17 |
* @throws Throwable An exception to be thrown to the caller, if not returning a value. A checked exception
|
|
18 |
* thrown from this method must be in the <code>throws</code> list of the invoked method.
|
|
19 |
*/
|
|
20 |
Object invoke(Invocation invocation) throws Throwable;
|
|
21 |
|
|
22 |
String getDescription(); |
|
23 |
} |
|
24 |
|
|