Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/dynamic
In directory sc8-pr-cvs1:/tmp/cvs-serv23613/src/core/com/mockobjects/dynamic
Modified Files:
Mock.java InvokableFactory.java DefaultInvokableFactory.java
Log Message:
started wrapping Invokable creation to move towards new Invokable structure
Index: Mock.java
===================================================================
RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/dynamic/Mock.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- Mock.java 2 Oct 2003 22:55:32 -0000 1.37
+++ Mock.java 2 Oct 2003 23:21:31 -0000 1.38
@@ -38,7 +38,7 @@
}
public void expect(String methodName, ConstraintMatcher args) {
- coreMock.add(callableFactory.createCallExpectation(callableFactory.createVoidCallable(methodName, args)));
+ coreMock.add(callableFactory.createVoidExpectation(methodName, args));
}
public void expectAndReturn(String methodName, ConstraintMatcher args, Object result) {
@@ -50,7 +50,7 @@
}
public void match(String methodName, ConstraintMatcher args) {
- coreMock.add(callableFactory.createVoidCallable(methodName, args));
+ coreMock.add(callableFactory.createVoidStub(methodName, args));
}
public void matchAndReturn(String methodName, ConstraintMatcher args, Object result) {
Index: InvokableFactory.java
===================================================================
RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/dynamic/InvokableFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InvokableFactory.java 11 Sep 2003 21:39:01 -0000 1.1
+++ InvokableFactory.java 2 Oct 2003 23:21:31 -0000 1.2
@@ -5,5 +5,6 @@
Invokable createReturnCallable( String methodName, ConstraintMatcher constraints, Object result );
Invokable createThrowableCallable( String methodName, ConstraintMatcher constraints, Throwable throwable);
- Invokable createVoidCallable( String methodName, ConstraintMatcher constraints);
+ Invokable createVoidStub ( String methodName, ConstraintMatcher constraints);
+ Invokable createVoidExpectation ( String methodName, ConstraintMatcher constraints);
}
Index: DefaultInvokableFactory.java
===================================================================
RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/dynamic/DefaultInvokableFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultInvokableFactory.java 11 Sep 2003 21:39:01 -0000 1.1
+++ DefaultInvokableFactory.java 2 Oct 2003 23:21:31 -0000 1.2
@@ -14,8 +14,12 @@
return createCallSignature(methodName, constraints, createThrowStub(throwable));
}
- public Invokable createVoidCallable(String methodName, ConstraintMatcher constraints) {
- return createCallSignature(methodName, constraints, createVoidStub());
+ public Invokable createVoidStub(String methodName, ConstraintMatcher constraints) {
+ return createCallSignature(methodName, constraints, new VoidStub());
+ }
+
+ public Invokable createVoidExpectation(String methodName, ConstraintMatcher constraints) {
+ return createCallExpectation(createCallSignature(methodName, constraints, new VoidStub()));
}
private Invokable createCallSignature(String methodName, ConstraintMatcher constraints, Invokable callable) {
@@ -28,10 +32,6 @@
private Invokable createThrowStub( Throwable exception ) {
return new ThrowStub(exception);
- }
-
- private Invokable createVoidStub() {
- return new VoidStub();
}
}
|