|
|||||||||||||||||||
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 | |||||||||||||||
ThrowStub.java | - | 66.7% | 66.7% | 66.7% |
|
1 |
/* Copyright (c) 2000-2003, jMock.org. See bundled LICENSE.txt */
|
|
2 |
package org.jmock.stub;
|
|
3 |
|
|
4 |
import org.jmock.dynamic.Invocation;
|
|
5 |
|
|
6 |
public class ThrowStub |
|
7 |
extends CallStub {
|
|
8 |
private Throwable throwable;
|
|
9 |
|
|
10 | 16 |
public ThrowStub(Throwable throwable) {
|
11 | 16 |
this.throwable = throwable;
|
12 |
} |
|
13 |
|
|
14 | 8 |
public Object invoke(Invocation invocation) throws Throwable { |
15 | 8 |
throw throwable;
|
16 |
} |
|
17 |
|
|
18 | 0 |
public String getDescription() {
|
19 | 0 |
return "throws <" + throwable + ">"; |
20 |
} |
|
21 |
} |
|
22 |
|
|