From: Steve F. <sm...@us...> - 2003-08-09 13:16:19
|
Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/dynamic In directory sc8-pr-cvs1:/tmp/cvs-serv937/src/core/com/mockobjects/dynamic Modified Files: CallOnceExpectation.java Log Message: Renamed delegate to delegateCall to simplify comparison with C# Index: CallOnceExpectation.java =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/dynamic/CallOnceExpectation.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- CallOnceExpectation.java 7 Jul 2003 01:17:57 -0000 1.5 +++ CallOnceExpectation.java 9 Aug 2003 13:16:17 -0000 1.6 @@ -3,36 +3,36 @@ import junit.framework.*; public class CallOnceExpectation implements Callable { - private Callable delegate; + private Callable delegateCall; private boolean wasCalled = false; - public CallOnceExpectation( Callable delegate ) { - this.delegate = delegate; + public CallOnceExpectation( Callable delegateCall ) { + this.delegateCall = delegateCall; } public String getDescription() { - return delegate.getDescription() + " [" + (wasCalled ? "" : "not ") + "called]"; + return delegateCall.getDescription() + " [" + (wasCalled ? "" : "not ") + "called]"; } public Object call(Invocation invocation) throws Throwable { wasCalled = true; - return delegate.call( invocation ); + return delegateCall.call( invocation ); } public boolean matches(Invocation invocation) { - return (!wasCalled) && delegate.matches( invocation ); + return (!wasCalled) && delegateCall.matches( invocation ); } public void verify() { if( !wasCalled ) { - throw new AssertionFailedError( delegate.getDescription() + " was expected but not called" ); + throw new AssertionFailedError( delegateCall.getDescription() + " was expected but not called" ); } - delegate.verify(); + delegateCall.verify(); } // Implemented to aid visualisation in an IDE debugger public String toString() { - return CoreMock.className(this.getClass()) + "(" + this.getDescription() + ")"; + return CoreMock.className(getClass()) + "(" + getDescription() + ")"; } } |