|
1 |
| package com.agical.rmock.extension.junit; |
|
2 |
| |
|
3 |
| import java.io.PrintStream; |
|
4 |
| import java.io.PrintWriter; |
|
5 |
| |
|
6 |
| import junit.framework.AssertionFailedError; |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| public class ExtendedAssertionFailedError extends AssertionFailedError { |
|
14 |
| private static final long serialVersionUID = 1L; |
|
15 |
| private final Throwable cause; |
|
16 |
| |
|
17 |
5
| public ExtendedAssertionFailedError(Throwable throwable ) {
|
|
18 |
5
| this.cause = throwable;
|
|
19 |
| } |
|
20 |
| |
|
21 |
2
| public String getMessage() {
|
|
22 |
2
| return cause.getMessage();
|
|
23 |
| } |
|
24 |
| |
|
25 |
1
| public void printStackTrace() {
|
|
26 |
1
| cause.printStackTrace();
|
|
27 |
| } |
|
28 |
| |
|
29 |
1
| public void printStackTrace(PrintStream s) {
|
|
30 |
1
| cause.printStackTrace(s);
|
|
31 |
| } |
|
32 |
| |
|
33 |
1
| public void printStackTrace(PrintWriter s) {
|
|
34 |
1
| cause.printStackTrace(s);
|
|
35 |
| } |
|
36 |
| |
|
37 |
0
| public Throwable getCause() {
|
|
38 |
0
| return cause;
|
|
39 |
| } |
|
40 |
| } |