KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > dynamic > CallCollection


1 package com.mockobjects.dynamic;
2
3 import junit.framework.AssertionFailedError;
4
5 abstract public class CallCollection extends Object JavaDoc {
6
7     protected AssertionFailedError createUnexpectedCallError(String JavaDoc methodName, Object JavaDoc[] args) {
8             
9         StringBuffer JavaDoc buf = new StringBuffer JavaDoc();
10         buf.append("Unexpected call: ");
11         buf.append(DynamicUtil.methodToString(methodName, args));
12         buf.append("\n");
13         buf.append("Expected ");
14         buf.append(getDescription());
15         return new AssertionFailedError(buf.toString());
16     }
17
18     abstract protected String JavaDoc getDescription();
19 }
20
Popular Tags