1
2
3
4 package himock.core.exception;
5
6 import java.lang.reflect.Method;
7
8 /***
9 * @author Chen Peng ,chen56@msn.com
10 */
11 public class ExpertedInvocationException extends RuntimeException {
12 public final Method[] fUninvokedMethods;
13
14 public ExpertedInvocationException(Method[] fUninvokedMethods) {
15 super("experted invocations in mocker : \n"+methodStr(fUninvokedMethods));
16 this.fUninvokedMethods=fUninvokedMethods;
17 }
18 private static String methodStr(Method[] methods){
19 StringBuffer sb = new StringBuffer();
20 for(int i=0;i<methods.length;i++){
21 sb.append(methods[i]);
22 sb.append("\n");
23 }
24 return sb.toString();
25 }
26 }