KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > dynamic > DefaultCallFactory


1 package com.mockobjects.dynamic;
2
3 public class DefaultCallFactory implements CallFactory {
4
5     public Callable createReturnStub(Object JavaDoc result) {
6         return new ReturnStub(result);
7     }
8
9     public Callable createThrowStub( Throwable JavaDoc exception ) {
10         return new ThrowStub(exception);
11     }
12
13     public Callable createCallExpectation(Callable call) {
14         return new CallOnceExpectation(call);
15     }
16
17     public Callable createCallSignature(String JavaDoc methodName, ConstraintMatcher constraints, Callable call) {
18         return new CallSignature( methodName, constraints, call );
19     }
20
21     public Callable createVoidStub() {
22         return new VoidStub();
23     }
24
25 }
26
Popular Tags