From: Steve F. <sm...@us...> - 2003-07-02 03:46:21
|
Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/dynamic In directory sc8-pr-cvs1:/tmp/cvs-serv18960/src/core/com/mockobjects/dynamic Modified Files: Mock.java Log Message: Added match() methods for methods that return void. Index: Mock.java =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/dynamic/Mock.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- Mock.java 12 Jun 2003 22:45:12 -0000 1.23 +++ Mock.java 2 Jul 2003 03:46:18 -0000 1.24 @@ -168,6 +168,26 @@ calls.addExpect(callFactory.createCallExpectation(callFactory.createCallSignature(methodName, args, callFactory.createThrowStub(exception)))); } + public void match(String methodName) { + match(methodName, C.NO_ARGS); + } + + public void match(String methodName, Object singleEqualArg) { + match(methodName, createConstraintMatcher(singleEqualArg)); + } + + public void match(String methodName, int singleEqualArg) { + match(methodName, new Integer(singleEqualArg)); + } + + public void match(String methodName, boolean singleEqualArg) { + match(methodName, new Boolean(singleEqualArg)); + } + + public void match(String methodName, ConstraintMatcher args) { + calls.addMatch(callFactory.createCallSignature(methodName, args, callFactory.createVoidStub())); + } + public void matchAndReturn(String methodName, Object result) { this.matchAndReturn(methodName, C.NO_ARGS, result); } @@ -272,4 +292,5 @@ */ public void expectNotCalled(String methodName) { } + } |