01: /*
02: * Copyright 2001-2005 The Apache Software Foundation
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.apache.commons.mail.mocks;
17:
18: import java.util.List;
19:
20: import javax.mail.internet.InternetAddress;
21:
22: import org.apache.commons.mail.SimpleEmail;
23:
24: /**
25: * Extension of SimpleEmail Class
26: * (used to allow testing only)
27: *
28: * @since 1.0
29: * @author <a href="mailto:corey.scott@gmail.com">Corey Scott</a>
30: * @version $Id: MockSimpleEmail.java 240033 2005-08-25 10:03:05Z henning $
31: */
32: public class MockSimpleEmail extends SimpleEmail {
33: /**
34: * Retrieve the message content
35: * @return Message Content
36: */
37: public String getMsg() {
38: return (String) this .content;
39: }
40:
41: /**
42: * @return fromAddress
43: */
44: public InternetAddress getFromAddress() {
45: return this .fromAddress;
46: }
47:
48: /**
49: * @return toList
50: */
51: public List getToList() {
52: return this .toList;
53: }
54:
55: /**
56: * @return bccList
57: */
58: public List getBccList() {
59: return this .bccList;
60: }
61:
62: /**
63: * @return ccList
64: */
65: public List getCcList() {
66: return this.ccList;
67: }
68:
69: }
|