KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > mail > MockTransport


1 package com.mockobjects.mail;
2
3 import javax.mail.event.TransportListener JavaDoc;
4 import alt.javax.mail.Message;
5 import javax.mail.Address JavaDoc;
6 import com.mockobjects.*;
7 import alt.javax.mail.Transport;
8
9 public class MockTransport extends MockService implements Transport {
10
11     private final ExpectationValue myMessage = new ExpectationValue("message");
12
13     public void setExpectedMessage(Message aMessage){
14         myMessage.setExpected(aMessage);
15     }
16
17     public void send(Message aMessage){
18         myMessage.setActual(aMessage);
19     }
20
21     public void send(Message msg, Address JavaDoc[] address){
22         notImplemented();
23     }
24
25     public void sendMessage(Message msg, Address JavaDoc[] address){
26         notImplemented();
27     }
28
29     public void addTransportListener(TransportListener JavaDoc transportListener){
30         notImplemented();
31     }
32
33     public void removeTransportListener(TransportListener JavaDoc transportListener){
34         notImplemented();
35     }
36
37 }
38
Popular Tags