1 package com.mockobjects.dynamic; 2 3 import junit.framework.AssertionFailedError; 4 5 abstract public class CallCollection extends Object { 6 7 protected AssertionFailedError createUnexpectedCallError(String methodName, Object [] args) { 8 9 StringBuffer buf = new StringBuffer (); 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 getDescription(); 19 } 20 | Popular Tags |