Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/mockobjects/dynamic/DefaultCallFactory.java


1   package com.mockobjects.dynamic;
2   
3   public class DefaultCallFactory implements CallFactory {
4   
5     public Callable createReturnStub(Object result) {
6       return new ReturnStub(result);
7     }
8   
9     public Callable createThrowStub( Throwable 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 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  }