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 @Deprecated
23 public class MockProxyFactoryBean implements FactoryBean {
24 private Class<?> interfaceClass;
25 private Map<String,Object> methodReturnMap;
26
27 @Override
28 public Object getObject() throws Exception {
29 return MockProxy.newInstance(methodReturnMap, interfaceClass);
30 }
31
32 @Override
33 public Class<?> getObjectType() {
34 return interfaceClass;
35 }
36
37 @Override
38 public boolean isSingleton() {
39 return false;
40 }
41
42
43
44
45 public Class<?> getInterfaceClass() {
46 return interfaceClass;
47 }
48
49
50
51
52 public void setInterfaceClass(Class<?> interfaceClass) {
53 this.interfaceClass = interfaceClass;
54 }
55
56
57
58
59 public Map<String, Object> getMethodReturnMap() {
60 return methodReturnMap;
61 }
62
63
64
65
66 public void setMethodReturnMap(Map<String, Object> methodReturnMap) {
67 this.methodReturnMap = methodReturnMap;
68 }
69
70 }