KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > vaj > MockTypeBuilder


1 package com.mockobjects.vaj;
2
3 import com.ibm.ivj.util.base.*;
4 import com.ibm.ivj.util.builders.*;
5 import junit.framework.*;
6 import java.util.*;
7 import com.mockobjects.*;
8
9 public class MockTypeBuilder extends MockObject implements TypeBuilder {
10     private String JavaDoc myBuilderName;
11     private SourceVerifier mySourceVerifier;
12     private ExpectationCounter mySaveCounter;
13
14
15     public MockTypeBuilder(SourceVerifier verifier, String JavaDoc builderName) {
16         super();
17
18         mySourceVerifier = verifier;
19         myBuilderName = builderName;
20         mySaveCounter = new ExpectationCounter(builderName + ".save()");
21         mySaveCounter.setExpected(1);
22     }
23
24     /**
25      * addMethodBuilder method comment.
26      */

27     public void addMethodBuilder(MethodBuilder arg1) {}
28
29     /**
30      * checkMethodExists method comment.
31      */

32     public boolean checkMethodExists(MethodBuilder arg1) throws IvjException {
33         return false;
34     }
35
36     /**
37      * getBuilderName method comment.
38      */

39     public String JavaDoc getBuilderName() {
40         return myBuilderName;
41     }
42
43     /**
44      * getExistingMethods method comment.
45      */

46     public com.ibm.ivj.util.builders.MethodBuilder[] getExistingMethods() throws IvjException {
47         return null;
48     }
49
50     /**
51      * getExistingMethodSource method comment.
52      */

53     public String JavaDoc getExistingMethodSource(MethodBuilder arg1) throws IvjException {
54         return null;
55     }
56
57     /**
58      * getExistingSource method comment.
59      */

60     public String JavaDoc getExistingSource() throws IvjException {
61         return null;
62     }
63
64     /**
65      * getMethodBuilders method comment.
66      */

67     public java.util.Enumeration JavaDoc getMethodBuilders() {
68         return null;
69     }
70
71     /**
72      * getSource method comment.
73      */

74     public String JavaDoc getSource() {
75         return null;
76     }
77
78     /**
79      * isMarkedForDeletion method comment.
80      */

81     public boolean isMarkedForDeletion() {
82         return false;
83     }
84
85     /**
86      * markForDeletion method comment.
87      */

88     public void markForDeletion(boolean arg1) {}
89
90     /**
91      * removeAllMethodBuilders method comment.
92      */

93     public void removeAllMethodBuilders() {}
94
95     /**
96      * removeMethodBuilder method comment.
97      */

98     public void removeMethodBuilder(MethodBuilder arg1) {}
99
100     /**
101      * save method comment.
102      */

103     public void save() throws IvjException {
104         mySaveCounter.inc();
105     }
106
107     /**
108      * saveMerge method comment.
109      */

110     public void saveMerge() throws IvjException {}
111
112     /**
113      * setSource method comment.
114      */

115     public void setSource(String JavaDoc source) {
116         mySourceVerifier.setSource(myBuilderName,source);
117     }
118
119     /**
120      * Mock method
121      */

122
123     public void verify() {
124         mySaveCounter.verify();
125     }
126 }
127
Popular Tags