1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.common.test.mock;
17
18 import java.util.Map;
19
20 import org.springframework.beans.factory.FactoryBean;
21
22 public class MockProxyFactoryBean implements FactoryBean {
23 private Class<?> interfaceClass;
24 private Map<String,Object> methodReturnMap;
25
26 @Override
27 public Object getObject() throws Exception {
28 return MockProxy.newInstance(methodReturnMap, interfaceClass);
29 }
30
31 @Override
32 public Class<?> getObjectType() {
33 return interfaceClass;
34 }
35
36 @Override
37 public boolean isSingleton() {
38 return false;
39 }
40
41
42
43
44 public Class<?> getInterfaceClass() {
45 return interfaceClass;
46 }
47
48
49
50
51 public void setInterfaceClass(Class<?> interfaceClass) {
52 this.interfaceClass = interfaceClass;
53 }
54
55
56
57
58 public Map<String, Object> getMethodReturnMap() {
59 return methodReturnMap;
60 }
61
62
63
64
65 public void setMethodReturnMap(Map<String, Object> methodReturnMap) {
66 this.methodReturnMap = methodReturnMap;
67 }
68
69 }