Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10562/input/javasrc/biz/xsoftware/mock
Modified Files:
MockObjectImpl.java MockSuperclass.java
Log Message:
add/removeIgnore works now
Index: MockSuperclass.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock/MockSuperclass.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** MockSuperclass.java 25 Aug 2006 19:42:09 -0000 1.12
--- MockSuperclass.java 25 Aug 2006 22:31:55 -0000 1.13
***************
*** 24,31 ****
* This class will also return the parameters that were passed into the MockObject
* so they can be introspected in testing to make sure they were correct.
! *
* The MockObject extending this class can also be told to throw exceptions on certain
* methods so we can test error leg behavior.
! *
* Example of how to use
* MockActionListener implements ActionListener and extends this class
--- 24,31 ----
* This class will also return the parameters that were passed into the MockObject
* so they can be introspected in testing to make sure they were correct.
! *
* The MockObject extending this class can also be told to throw exceptions on certain
* methods so we can test error leg behavior.
! *
* Example of how to use
* MockActionListener implements ActionListener and extends this class
***************
*** 38,42 ****
* }
* </PRE>
! *
* In the test, when you expect an ActionEvent, you can call
* <PRE>
--- 38,42 ----
* }
* </PRE>
! *
* In the test, when you expect an ActionEvent, you can call
* <PRE>
***************
*** 45,55 ****
* assertNonNull(evt.getSource());
* </PRE>
! *
* Another useful behavior is throwing any type of exception using
* setExceptionOnMethod(String method, Throwable e). This can test
* robustness in a system to make sure listeners or services that
! * throw exceptions don't affect your system, or at least affect
* your system in the proper way.
! *
* @author Dean Hiller (de...@xs...)
*/
--- 45,55 ----
* assertNonNull(evt.getSource());
* </PRE>
! *
* Another useful behavior is throwing any type of exception using
* setExceptionOnMethod(String method, Throwable e). This can test
* robustness in a system to make sure listeners or services that
! * throw exceptions don't affect your system, or at least affect
* your system in the proper way.
! *
* @author Dean Hiller (de...@xs...)
*/
***************
*** 62,66 ****
*/
private List<CalledMethod> methodsCalled = new LinkedList<CalledMethod>();
!
/**
* A map of queues, containing either
--- 62,66 ----
*/
private List<CalledMethod> methodsCalled = new LinkedList<CalledMethod>();
!
/**
* A map of queues, containing either
***************
*** 75,83 ****
*/
private Map<String, Object> methodToDefaultRetVal = new HashMap<String, Object>();
!
private List<String> ignoredMethods = new ArrayList<String>();
!
private Cloner cloner;
!
/**
* Default wait time to wait for a method to be called once expectCall is
--- 75,83 ----
*/
private Map<String, Object> methodToDefaultRetVal = new HashMap<String, Object>();
!
private List<String> ignoredMethods = new ArrayList<String>();
!
private Cloner cloner;
!
/**
* Default wait time to wait for a method to be called once expectCall is
***************
*** 90,94 ****
/**
! * Default constructor of superclass of all mockObjects with a delay of
* 10 seconds. This delay is the amount of time the mock object waits for
* a method to be called when a client calls expectCall.
--- 90,94 ----
/**
! * Default constructor of superclass of all mockObjects with a delay of
* 10 seconds. This delay is the amount of time the mock object waits for
* a method to be called when a client calls expectCall.
***************
*** 100,104 ****
* such that the mock object will give methods a longer time to be called
* before timing out to fail the test.
! *
* @param delay The amount of time in milliseconds to wait for a method to be
* called.
--- 100,104 ----
* such that the mock object will give methods a longer time to be called
* before timing out to fail the test.
! *
* @param delay The amount of time in milliseconds to wait for a method to be
* called.
***************
*** 107,115 ****
waitTime = delay;
}
!
public MockSuperclass(String id) {
this.id = id;
}
!
public void setExpectTimeout(int delay) {
this.waitTime = delay;
--- 107,115 ----
waitTime = delay;
}
!
public MockSuperclass(String id) {
this.id = id;
}
!
public void setExpectTimeout(int delay) {
this.waitTime = delay;
***************
*** 118,142 ****
return waitTime;
}
!
public void addIgnore(String method)
{
ignoreImpl(method);
}
!
public void addIgnore(String ... methods)
{
ignoreImpl(methods);
}
!
public void removeIgnore(String method)
{
removeIgnoreImpl(method);
}
!
public void removeIgnore(String ... methods)
{
removeIgnoreImpl(methods);
}
!
private void removeIgnoreImpl(String ... methods)
{
--- 118,142 ----
return waitTime;
}
!
public void addIgnore(String method)
{
ignoreImpl(method);
}
!
public void addIgnore(String ... methods)
{
ignoreImpl(methods);
}
!
public void removeIgnore(String method)
{
removeIgnoreImpl(method);
}
!
public void removeIgnore(String ... methods)
{
removeIgnoreImpl(methods);
}
!
private void removeIgnoreImpl(String ... methods)
{
***************
*** 146,160 ****
}
}
!
private void ignoreImpl(String ... methods)
{
addIgnoredMethods(methods);
}
!
public void addIgnoredMethods(String[] methods) {
if(methods == null)
return;
verifyMethodsExist(methods);
!
for(String method : methods)
{
--- 146,160 ----
}
}
!
private void ignoreImpl(String ... methods)
{
addIgnoredMethods(methods);
}
!
public void addIgnoredMethods(String[] methods) {
if(methods == null)
return;
verifyMethodsExist(methods);
!
for(String method : methods)
{
***************
*** 162,172 ****
}
}
!
public void setIgnoredMethods(String[] methods)
{
if(methods == null)
! ignoredMethods = new ArrayList<String>();
verifyMethodsExist(methods);
!
for(String method : methods)
{
--- 162,173 ----
}
}
!
public void setIgnoredMethods(String[] methods)
{
if(methods == null)
! return;
! ignoredMethods = new ArrayList<String>();
verifyMethodsExist(methods);
!
for(String method : methods)
{
***************
*** 174,183 ****
}
}
!
/**
* Subclasses should call this method when a method on their interface
* is called. This method is for users to create subclasses and call so
* they don't have to wrap it in a try-catch block.
! *
* @param method
* @param parameters
--- 175,184 ----
}
}
!
/**
* Subclasses should call this method when a method on their interface
* is called. This method is for users to create subclasses and call so
* they don't have to wrap it in a try-catch block.
! *
* @param method
* @param parameters
***************
*** 197,201 ****
}
}
!
protected synchronized Object methodCalledImpl(String method, Object[] parameters) throws Throwable {
method = method.intern();
--- 198,202 ----
}
}
!
protected synchronized Object methodCalledImpl(String method, Object[] parameters) throws Throwable {
method = method.intern();
***************
*** 213,220 ****
if (log.isLoggable(Level.FINE))
log.log(Level.FINE, id+"method called="+method+"("+params+") on obj="+this);
!
! //sometimes, the contract is for the "code" to give a parameter
! //to a library and then modify the parameter after the library
! //is done with it. This means the object the "code" gave to
//the MockObject will change out from under the MockObject and be
//corrupted meaning you can't write a test to test the contract
--- 214,221 ----
if (log.isLoggable(Level.FINE))
log.log(Level.FINE, id+"method called="+method+"("+params+") on obj="+this);
!
! //sometimes, the contract is for the "code" to give a parameter
! //to a library and then modify the parameter after the library
! //is done with it. This means the object the "code" gave to
//the MockObject will change out from under the MockObject and be
//corrupted meaning you can't write a test to test the contract
***************
*** 222,228 ****
Object[] newParams = clone(method, parameters);
methodsCalled.add(new CalledMethod(method, newParams, new Throwable().fillInStackTrace()));
!
this.notifyAll();
!
return findNextAction(method, parameters);
}
--- 223,229 ----
Object[] newParams = clone(method, parameters);
methodsCalled.add(new CalledMethod(method, newParams, new Throwable().fillInStackTrace()));
!
this.notifyAll();
!
return findNextAction(method, parameters);
}
***************
*** 234,238 ****
return methodToDefaultRetVal.get(method);
}
!
Object retVal = l.remove(0);
if(l.size()<=0)
--- 235,239 ----
return methodToDefaultRetVal.get(method);
}
!
Object retVal = l.remove(0);
if(l.size()<=0)
***************
*** 240,244 ****
else if(retVal == null)
methodToDefaultRetVal.get(method);
!
if(retVal instanceof Behavior) {
return ((Behavior)retVal).runMethod(params);
--- 241,245 ----
else if(retVal == null)
methodToDefaultRetVal.get(method);
!
if(retVal instanceof Behavior) {
return ((Behavior)retVal).runMethod(params);
***************
*** 250,254 ****
return retVal;
}
!
/**
* @see biz.xsoftware.mock.MockObject#expectUnorderedCalls(java.lang.String[])
--- 251,255 ----
return retVal;
}
!
/**
* @see biz.xsoftware.mock.MockObject#expectUnorderedCalls(java.lang.String[])
***************
*** 258,262 ****
throw new IllegalArgumentException("methods cannot be null");
else if(methods.length <= 0)
! throw new IllegalArgumentException("methods.length must be >= 1");
for(int i = 0; i < methods.length; i++) {
if(methods[i] == null)
--- 259,263 ----
throw new IllegalArgumentException("methods cannot be null");
else if(methods.length <= 0)
! throw new IllegalArgumentException("methods.length must be >= 1");
for(int i = 0; i < methods.length; i++) {
if(methods[i] == null)
***************
*** 264,276 ****
"can be null, yet methods["+i+"] was null");
}
!
Map<String, Integer> expectedMethods = new HashMap<String, Integer>();
for(int i = 0; i < methods.length; i++) {
expectedMethods.put(methods[i], new Integer(i));
}
!
Set<String> ignorables = createIgnorableMap(ignoredMethods);
CalledMethod[] retVal = new CalledMethod[methods.length];
!
List<CalledMethod> methodsCalledList = new ArrayList<CalledMethod>();
for(int i = 0; i < methods.length; i++) {
--- 265,277 ----
"can be null, yet methods["+i+"] was null");
}
!
Map<String, Integer> expectedMethods = new HashMap<String, Integer>();
for(int i = 0; i < methods.length; i++) {
expectedMethods.put(methods[i], new Integer(i));
}
!
Set<String> ignorables = createIgnorableMap(ignoredMethods);
CalledMethod[] retVal = new CalledMethod[methods.length];
!
List<CalledMethod> methodsCalledList = new ArrayList<CalledMethod>();
for(int i = 0; i < methods.length; i++) {
***************
*** 278,285 ****
throw new IllegalArgumentException("The parameter 'methods' in " +
"expectUnorderedCalls cannot contain MockSuperclass.ANY(use expectOrderedCalls instead)");
!
CalledMethod o = expectUnignoredCall(ANY, ignorables, methodsCalledList);
if(o == null) {
! String reason = putTogetherReason(methods, ignorables, methodsCalledList,
"timed out on next expected method\n");
throw new ExpectFailedException("Timed out waiting for a method call\n"
--- 279,286 ----
throw new IllegalArgumentException("The parameter 'methods' in " +
"expectUnorderedCalls cannot contain MockSuperclass.ANY(use expectOrderedCalls instead)");
!
CalledMethod o = expectUnignoredCall(ANY, ignorables, methodsCalledList);
if(o == null) {
! String reason = putTogetherReason(methods, ignorables, methodsCalledList,
"timed out on next expected method\n");
throw new ExpectFailedException("Timed out waiting for a method call\n"
***************
*** 291,298 ****
throw new ExpectFailedException(reason, retVal, ExpectFailedException.UNEXPECTED_CALL_BEFORE);
}
!
retVal[index.intValue()] = o;
}
!
LeftOverMethods leftOver = getLeftOverMethods(ignorables);
if(leftOver != null) {
--- 292,299 ----
throw new ExpectFailedException(reason, retVal, ExpectFailedException.UNEXPECTED_CALL_BEFORE);
}
!
retVal[index.intValue()] = o;
}
!
LeftOverMethods leftOver = getLeftOverMethods(ignorables);
if(leftOver != null) {
***************
*** 301,309 ****
, ExpectFailedException.UNEXPECTED_CALL_AFTER);
}
!
return retVal;
}
!
! private String getHowMethodWasCalled(CalledMethod method) {
Throwable t = method.getHowItWasCalled();
String retVal = "\nThe last method was="+method.getMethodName();
--- 302,310 ----
, ExpectFailedException.UNEXPECTED_CALL_AFTER);
}
!
return retVal;
}
!
! private String getHowMethodWasCalled(CalledMethod method) {
Throwable t = method.getHowItWasCalled();
String retVal = "\nThe last method was="+method.getMethodName();
***************
*** 326,330 ****
return retVal;
}
!
/**
* @see biz.xsoftware.mock.MockObject#expectCall(java.lang.String)
--- 327,331 ----
return retVal;
}
!
/**
* @see biz.xsoftware.mock.MockObject#expectCall(java.lang.String)
***************
*** 333,344 ****
return expectImpl(new String[] {method})[0];
}
!
/**
* @see biz.xsoftware.mock.MockObject#expect(java.lang.String)
*/
public CalledMethod expect(String method) {
! return expectImpl(new String[] {method})[0];
}
!
/**
* @see biz.xsoftware.mock.MockObject#expect(java.lang.String[])
--- 334,345 ----
return expectImpl(new String[] {method})[0];
}
!
/**
* @see biz.xsoftware.mock.MockObject#expect(java.lang.String)
*/
public CalledMethod expect(String method) {
! return expectImpl(method)[0];
}
!
/**
* @see biz.xsoftware.mock.MockObject#expect(java.lang.String[])
***************
*** 348,357 ****
return expectImpl(methods);
}
!
! private synchronized CalledMethod[] expectImpl(String[] methods)
{
return expectOrderedCalls(methods);
}
!
/**
* @see biz.xsoftware.mock.MockObject#expectOrderedCalls(java.lang.String[])
--- 349,358 ----
return expectImpl(methods);
}
!
! private synchronized CalledMethod[] expectImpl(String ... methods)
{
return expectOrderedCalls(methods);
}
!
/**
* @see biz.xsoftware.mock.MockObject#expectOrderedCalls(java.lang.String[])
***************
*** 368,372 ****
verifyMethodsExist(methods);
!
Set<String> ignorables = createIgnorableMap(ignoredMethods);
--- 369,373 ----
verifyMethodsExist(methods);
!
Set<String> ignorables = createIgnorableMap(ignoredMethods);
***************
*** 400,404 ****
}
}
!
LeftOverMethods leftOver = getLeftOverMethods(ignorables);
if(leftOver != null) {
--- 401,405 ----
}
}
!
LeftOverMethods leftOver = getLeftOverMethods(ignorables);
if(leftOver != null) {
***************
*** 407,415 ****
CalledMethod[] calledOnes = new CalledMethod[retVal.length+1];
System.arraycopy(retVal, 0, calledOnes, 0, retVal.length);
! calledOnes[retVal.length] = leftOver.getMethods()[0];
throw new ExpectFailedException("There was a method called after your expected methods.\n"+reason, calledOnes
, ExpectFailedException.UNEXPECTED_CALL_AFTER);
}
!
return retVal;
}
--- 408,416 ----
CalledMethod[] calledOnes = new CalledMethod[retVal.length+1];
System.arraycopy(retVal, 0, calledOnes, 0, retVal.length);
! calledOnes[retVal.length] = leftOver.getMethods()[0];
throw new ExpectFailedException("There was a method called after your expected methods.\n"+reason, calledOnes
, ExpectFailedException.UNEXPECTED_CALL_AFTER);
}
!
return retVal;
}
***************
*** 426,446 ****
if(classes == null)
return;
!
String classNames = "";
for(int i = 0; i < classes.length; i++) {
if(log.isLoggable(Level.FINEST))
! log.finest("class="+classes[i].getName());
if(methodExistInThisClass(method, classes[i]))
return;
classNames += "\n"+classes[i];
}
!
throw new IllegalArgumentException("method='"+method+"' is not a method on any of the" +
"\nfollowing Classes/Interfaces"+classNames);
}
!
private boolean methodExistInThisClass(String method, Class c) {
Method[] methods = c.getMethods();
! for(int i = 0; i < methods.length; i++) {
if(log.isLoggable(Level.FINEST))
log.finest("method in class='"+methods[i].getName()+"' expected='"+method+"'");
--- 427,447 ----
if(classes == null)
return;
!
String classNames = "";
for(int i = 0; i < classes.length; i++) {
if(log.isLoggable(Level.FINEST))
! log.finest("class="+classes[i].getName());
if(methodExistInThisClass(method, classes[i]))
return;
classNames += "\n"+classes[i];
}
!
throw new IllegalArgumentException("method='"+method+"' is not a method on any of the" +
"\nfollowing Classes/Interfaces"+classNames);
}
!
private boolean methodExistInThisClass(String method, Class c) {
Method[] methods = c.getMethods();
! for(int i = 0; i < methods.length; i++) {
if(log.isLoggable(Level.FINEST))
log.finest("method in class='"+methods[i].getName()+"' expected='"+method+"'");
***************
*** 450,454 ****
return false;
}
!
private String putTogetherReason(String[] methods, Set<String> ignorables, List methodsCalled, String lastLine) {
String reason = "\nMethods you expected...\n";
--- 451,455 ----
return false;
}
!
private String putTogetherReason(String[] methods, Set<String> ignorables, List methodsCalled, String lastLine) {
String reason = "\nMethods you expected...\n";
***************
*** 475,495 ****
else
reason += lastLine+"\n";
!
!
return reason;
}
!
protected synchronized CalledMethod expectUnignoredCall(String method, Set<String> ignorables, List<CalledMethod> calledMethods) {
if(method == null)
method = NONE;
!
! //kind of dangerous if used with multiple threads because we might miss
//a bad event coming in, but if you keep using the same listener for every test
! //the problem should still manifest itself in a
//different test case which sucks but works.
if(method.equals(NONE)) {
if (log.isLoggable(Level.FINE))
! log.log(Level.FINE, "method expected="+NONE+" on obj="+this);
LeftOverMethods leftOver = getLeftOverMethods(ignorables);
if(leftOver != null) {
--- 476,510 ----
else
reason += lastLine+"\n";
!
!
return reason;
}
!
protected synchronized CalledMethod expectUnignoredCall(String method, Set<String> ignorables, List<CalledMethod> calledMethods) {
if(method == null)
method = NONE;
!
! //kind of dangerous if used with multiple threads because we might miss
//a bad event coming in, but if you keep using the same listener for every test
! //the problem should still manifest itself in a
//different test case which sucks but works.
if(method.equals(NONE)) {
if (log.isLoggable(Level.FINE))
! log.log(Level.FINE, "method expected="+NONE+" on obj="+this);
!
! // we have to strip out all of the ignored methods from methodsCalled
! CalledMethod[] methods = methodsCalled.toArray(new CalledMethod[0]);
! for(CalledMethod calledMethod : methods)
! {
! if(ignorables.contains(calledMethod.getMethodName()))
! {
! while(methodsCalled.contains(calledMethod))
! {
! methodsCalled.remove(calledMethod);
! }
! }
! }
!
LeftOverMethods leftOver = getLeftOverMethods(ignorables);
if(leftOver != null) {
***************
*** 501,515 ****
return new CalledMethod(NONE, null, null);
}
!
try {
return waitForUnignoredCall(method, ignorables, calledMethods);
} catch (InterruptedException e) {
throw new RuntimeException(e);
! }
}
private CalledMethod waitForUnignoredCall(
String logM, Set<String> ignorables, List<CalledMethod> calledMethods) throws InterruptedException {
!
long waitTime2 = waitTime+50;
long currentTime;
--- 516,530 ----
return new CalledMethod(NONE, null, null);
}
!
try {
return waitForUnignoredCall(method, ignorables, calledMethods);
} catch (InterruptedException e) {
throw new RuntimeException(e);
! }
}
private CalledMethod waitForUnignoredCall(
String logM, Set<String> ignorables, List<CalledMethod> calledMethods) throws InterruptedException {
!
long waitTime2 = waitTime+50;
long currentTime;
***************
*** 525,529 ****
waitTime2 -= waitedOnWait;
}
!
//check for new methods to be called now...if no non-ignorable methods, then
//continue while loop.
--- 540,544 ----
waitTime2 -= waitedOnWait;
}
!
//check for new methods to be called now...if no non-ignorable methods, then
//continue while loop.
***************
*** 533,546 ****
if(!ignorables.contains(calledMethod.getMethodName())) {
if(log.isLoggable(Level.FINE))
! log.fine("method expected and was called="+logM+" on obj="+this);
return calledMethod;
}
}
! }
//return null means timeout....
return null;
}
!
private Set<String> createIgnorableMap(List<String> ignorableMethods) {
Set<String> ignorables = new HashSet<String>();
--- 548,561 ----
if(!ignorables.contains(calledMethod.getMethodName())) {
if(log.isLoggable(Level.FINE))
! log.fine("method expected and was called="+logM+" on obj="+this);
return calledMethod;
}
}
! }
//return null means timeout....
return null;
}
!
private Set<String> createIgnorableMap(List<String> ignorableMethods) {
Set<String> ignorables = new HashSet<String>();
***************
*** 563,572 ****
if(leftOver.size() <= 0)
return null;
!
CalledMethod[] m = new CalledMethod[0];
m = leftOver.toArray(m);
return new LeftOverMethods(m);
}
!
private class LeftOverMethods {
--- 578,587 ----
if(leftOver.size() <= 0)
return null;
!
CalledMethod[] m = new CalledMethod[0];
m = leftOver.toArray(m);
return new LeftOverMethods(m);
}
!
private class LeftOverMethods {
***************
*** 591,595 ****
/**
* @see biz.xsoftware.mock.MockObject#addThrowException(java.lang.String, java.lang.Throwable)
! */
public synchronized void addThrowException(String method, Throwable e) {
if(method == null)
--- 606,610 ----
/**
* @see biz.xsoftware.mock.MockObject#addThrowException(java.lang.String, java.lang.Throwable)
! */
public synchronized void addThrowException(String method, Throwable e) {
if(method == null)
***************
*** 604,608 ****
l.add(e);
}
!
/**
* @see biz.xsoftware.mock.MockObject#addReturnValue(java.lang.String, java.lang.Object)
--- 619,623 ----
l.add(e);
}
!
/**
* @see biz.xsoftware.mock.MockObject#addReturnValue(java.lang.String, java.lang.Object)
***************
*** 618,631 ****
l.add(o);
}
!
public void setDefaultReturnValue(String method, Object o) {
methodToDefaultRetVal.put(method, o);
}
!
/**
* This is the method that calls the cloner to clone
* objects like ByteBuffer that can change after
* they are called.
! *
* @param o
* @return
--- 633,646 ----
l.add(o);
}
!
public void setDefaultReturnValue(String method, Object o) {
methodToDefaultRetVal.put(method, o);
}
!
/**
* This is the method that calls the cloner to clone
* objects like ByteBuffer that can change after
* they are called.
! *
* @param o
* @return
***************
*** 634,638 ****
if(params == null)
return null;
!
//check if the next object is a Behavior object
List<Object> actions = methodToReturnVal.get(method);
--- 649,653 ----
if(params == null)
return null;
!
//check if the next object is a Behavior object
List<Object> actions = methodToReturnVal.get(method);
***************
*** 644,663 ****
}
}
!
!
if(cloner == null)
return params;
!
return cloner.clone(params);
! }
!
public Class[] getClasses() {
return new Class[] {this.getClass()};
}
!
public void setCloner(Cloner c) {
cloner = c;
}
!
public void addBehavior(String method, Behavior behavior) {
if(method == null)
--- 659,678 ----
}
}
!
!
if(cloner == null)
return params;
!
return cloner.clone(params);
! }
!
public Class[] getClasses() {
return new Class[] {this.getClass()};
}
!
public void setCloner(Cloner c) {
cloner = c;
}
!
public void addBehavior(String method, Behavior behavior) {
if(method == null)
Index: MockObjectImpl.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock/MockObjectImpl.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** MockObjectImpl.java 7 Aug 2006 15:52:45 -0000 1.8
--- MockObjectImpl.java 25 Aug 2006 22:31:55 -0000 1.9
***************
*** 64,68 ****
}
throw new RuntimeException("\nYou must specify a return value of type " +
! returnType.getCanonicalName() +
" for ignored or expected method:\n" +
" " + method.getName() + "(" + methodArgs + ")");
--- 64,68 ----
}
throw new RuntimeException("\nYou must specify a return value of type " +
! returnType +
" for ignored or expected method:\n" +
" " + method.getName() + "(" + methodArgs + ")");
|