KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.mockobjects.mail;
2
3 import com.mockobjects.*;
4 import javax.mail.Authenticator JavaDoc;
5 import javax.mail.Provider JavaDoc;
6 import javax.mail.URLName JavaDoc;
7 import javax.mail.PasswordAuthentication JavaDoc;
8 import alt.javax.mail.Transport;
9 import alt.javax.mail.Session;
10
11 import javax.mail.Address JavaDoc;
12 import javax.mail.Store JavaDoc;
13 import javax.mail.Folder JavaDoc;
14 import java.util.*;
15
16 public class MockSession extends MockObject implements Session {
17     private final ExpectationValue myDebug = new ExpectationValue("debug");
18     private final ExpectationValue myTransportName =
19         new ExpectationValue("transport name");
20     private final ReturnValue myTransport = new ReturnValue("transport");
21
22     public Session getInstance(Properties props, Authenticator JavaDoc authenticator){
23         notImplemented();
24         return null;
25     }
26
27     public Session getInstance(Properties props){
28         notImplemented();
29         return null;
30     }
31
32     public Session getDefaultInstance(Properties props, Authenticator JavaDoc
33     authenticator){
34         notImplemented();
35         return null;
36     }
37
38     public Session getDefaultInstance(Properties props){
39         notImplemented();
40         return null;
41     }
42
43     public void setExpectedDebug(boolean aDebug){
44         myDebug.setActual(aDebug);
45     }
46
47     public void setDebug(boolean aDebug){
48         myDebug.setActual(aDebug);
49     }
50
51     public boolean getDebug(){
52         notImplemented();
53         return false;
54     }
55
56     public Provider JavaDoc getProviders()[]{
57         notImplemented();
58         return null;
59     }
60
61     public Provider JavaDoc getProvider(String JavaDoc name){
62         notImplemented();
63         return null;
64     }
65
66     public void setProvider(Provider JavaDoc provider){
67         notImplemented();
68     }
69
70     public Transport getTransport(){
71         notImplemented();
72         return null;
73     }
74
75     public void setExpectedTransport(String JavaDoc aTransportName){
76         myTransportName.setExpected(aTransportName);
77     }
78
79     public void setupGetTransport(Transport aTransport){
80         myTransport.setValue(aTransport);
81     }
82
83     public Transport getTransport(String JavaDoc aTransportName){
84         myTransportName.setActual(aTransportName);
85         return (Transport)myTransport.getValue();
86     }
87
88     public Transport getTransport(Address JavaDoc address){
89         notImplemented();
90         return null;
91     }
92
93     public Transport getTransport(Provider JavaDoc provider){
94         notImplemented();
95         return null;
96     }
97
98     public Transport getTransport(URLName JavaDoc url){
99         notImplemented();
100         return null;
101     }
102
103     public Store JavaDoc getStore(){
104         notImplemented();
105         return null;
106     }
107
108     public Store JavaDoc getStore(String JavaDoc name){
109         notImplemented();
110         return null;
111     }
112
113     public Store JavaDoc getStore(URLName JavaDoc url){
114         notImplemented();
115         return null;
116     }
117
118     public Store JavaDoc getStore(Provider JavaDoc provider){
119         notImplemented();
120         return null;
121     }
122
123     public Folder JavaDoc getFolder(){
124         notImplemented();
125         return null;
126     }
127
128     public Folder JavaDoc getFolder(Store JavaDoc store){
129         notImplemented();
130         return null;
131     }
132
133     public Folder JavaDoc getFolder(URLName JavaDoc url){
134         notImplemented();
135         return null;
136     }
137
138     public void setPasswordAuthentication(URLName JavaDoc url, PasswordAuthentication JavaDoc
139     passwordAuthentication){
140         notImplemented();
141     }
142
143     public PasswordAuthentication JavaDoc getPasswordAuthentication(URLName JavaDoc url){
144         notImplemented();
145         return null;
146     }
147
148     public PasswordAuthentication JavaDoc requestPasswordAuthentication(java.net.InetAddress JavaDoc address, int port, String JavaDoc protocol, String JavaDoc prompt, String JavaDoc defaultUserName){
149         notImplemented();
150         return null;
151     }
152
153     public Properties getProperties(){
154         notImplemented();
155         return null;
156     }
157
158     public String JavaDoc getProperty(String JavaDoc name){
159         notImplemented();
160         return null;
161     }
162
163     public javax.mail.Session JavaDoc getWrappedSession(){
164         notImplemented();
165         return null;
166     }
167
168 }
169
Popular Tags