KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > mail > internet > MockMimeMessage


1 package com.mockobjects.mail.internet;
2
3 import alt.javax.mail.internet.MimeMessage;
4 import com.mockobjects.ExpectationList;
5 import com.mockobjects.mail.MockMessage;
6
7 import javax.mail.Address JavaDoc;
8 import javax.mail.Flags JavaDoc;
9 import javax.mail.Folder JavaDoc;
10 import javax.mail.MessagingException JavaDoc;
11 import javax.mail.search.SearchTerm JavaDoc;
12 import java.io.IOException JavaDoc;
13 import java.io.InputStream JavaDoc;
14 import java.io.OutputStream JavaDoc;
15 import java.util.Enumeration JavaDoc;
16
17 public class MockMimeMessage extends MockMessage implements MimeMessage {
18     private final ExpectationList myAddresses =
19         new ExpectationList("addresses");
20     private final ExpectationList myRecipientTypes =
21         new ExpectationList("recipient types");
22
23     public void setRecipient(javax.mail.Message.RecipientType type, Address JavaDoc address) throws MessagingException JavaDoc {
24         notImplemented();
25     }
26
27     public void setExpectedAddRecipient(javax.mail.Message.RecipientType aType,
28         Address JavaDoc anAddress) {
29
30         myAddresses.addExpected(anAddress);
31         myRecipientTypes.addExpected(aType);
32     }
33
34     public void addRecipient(javax.mail.Message.RecipientType aType,
35         Address JavaDoc anAddress) throws MessagingException JavaDoc {
36         myAddresses.addActual(anAddress);
37         myRecipientTypes.addActual(aType);
38     }
39
40     public void setFlag(Flags.Flag JavaDoc flag, boolean b) throws MessagingException JavaDoc {
41         notImplemented();
42     }
43
44     public int getMessageNumber() {
45         notImplemented();
46         return 0;
47     }
48
49     public String JavaDoc getBody() {
50         notImplemented();
51         return null;
52     }
53
54     public Folder JavaDoc getFolder() {
55         notImplemented();
56         return null;
57     }
58
59     public void setBody(String JavaDoc messageText) {
60         notImplemented();
61     }
62
63     public boolean isExpunged() {
64         notImplemented();
65         return false;
66     }
67
68     public boolean match(SearchTerm JavaDoc term) throws MessagingException JavaDoc {
69         notImplemented();
70         return false;
71     }
72
73     public Address JavaDoc[] getAllRecipients() throws MessagingException JavaDoc {
74         notImplemented();
75         return new Address JavaDoc[0];
76     }
77
78     public void setRecipients(javax.mail.Message.RecipientType type, String JavaDoc s) throws MessagingException JavaDoc {
79         notImplemented();
80     }
81
82     public void addRecipients(javax.mail.Message.RecipientType type, String JavaDoc s) throws MessagingException JavaDoc {
83         notImplemented();
84     }
85
86     public Address JavaDoc[] getReplyTo() throws MessagingException JavaDoc {
87         notImplemented();
88         return new Address JavaDoc[0];
89     }
90
91     public void setReplyTo(Address JavaDoc[] addresses) throws MessagingException JavaDoc {
92         notImplemented();
93     }
94
95     public void setSubject(String JavaDoc s, String JavaDoc s1) throws MessagingException JavaDoc {
96         notImplemented();
97     }
98
99     public String JavaDoc getEncoding() throws MessagingException JavaDoc {
100         notImplemented();
101         return null;
102     }
103
104     public String JavaDoc getContentID() throws MessagingException JavaDoc {
105         notImplemented();
106         return null;
107     }
108
109     public void setContentID(String JavaDoc s) throws MessagingException JavaDoc {
110         notImplemented();
111     }
112
113     public String JavaDoc getContentMD5() throws MessagingException JavaDoc {
114         notImplemented();
115         return null;
116     }
117
118     public void setContentMD5(String JavaDoc s) throws MessagingException JavaDoc {
119         notImplemented();
120     }
121
122     public void setDescription(String JavaDoc s, String JavaDoc s1) throws MessagingException JavaDoc {
123         notImplemented();
124     }
125
126     public String JavaDoc[] getContentLanguage() throws MessagingException JavaDoc {
127         notImplemented();
128         return new String JavaDoc[0];
129     }
130
131     public void setContentLanguage(String JavaDoc[] strings) throws MessagingException JavaDoc {
132         notImplemented();
133     }
134
135     public String JavaDoc getMessageID() throws MessagingException JavaDoc {
136         notImplemented();
137         return null;
138     }
139
140     public InputStream JavaDoc getRawInputStream() throws MessagingException JavaDoc {
141         notImplemented();
142         return null;
143     }
144
145     public void setText(String JavaDoc s, String JavaDoc s1) throws MessagingException JavaDoc {
146         notImplemented();
147     }
148
149     public void writeTo(OutputStream JavaDoc stream, String JavaDoc[] strings) throws IOException JavaDoc, MessagingException JavaDoc {
150         notImplemented();
151     }
152
153     public String JavaDoc getHeader(String JavaDoc s, String JavaDoc s1) throws MessagingException JavaDoc {
154         notImplemented();
155         return null;
156     }
157
158     public void addHeaderLine(String JavaDoc s) throws MessagingException JavaDoc {
159         notImplemented();
160     }
161
162     public Enumeration JavaDoc getAllHeaderLines() throws MessagingException JavaDoc {
163         notImplemented();
164         return null;
165     }
166
167     public Enumeration JavaDoc getMatchingHeaderLines(String JavaDoc[] strings) throws MessagingException JavaDoc {
168         notImplemented();
169         return null;
170     }
171
172     public Enumeration JavaDoc getNonMatchingHeaderLines(String JavaDoc[] strings) throws MessagingException JavaDoc {
173         notImplemented();
174         return null;
175     }
176
177     public boolean isSet(Flags.Flag JavaDoc flag) throws MessagingException JavaDoc {
178         notImplemented();
179         return false;
180     }
181 }
182
Popular Tags