1 /* 2 * Copyright 2001-2005 The Apache Software Foundation 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 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 /** 35 * Retrieve the message content 36 * @return Message Content 37 */ 38 public String getMsg() 39 { 40 return (String) this.content; 41 } 42 43 /** 44 * @return fromAddress 45 */ 46 public InternetAddress getFromAddress() 47 { 48 return this.fromAddress; 49 } 50 51 /** 52 * @return toList 53 */ 54 public List getToList() 55 { 56 return this.toList; 57 } 58 59 /** 60 * @return bccList 61 */ 62 public List getBccList() 63 { 64 return this.bccList; 65 } 66 67 /** 68 * @return ccList 69 */ 70 public List getCcList() 71 { 72 return this.ccList; 73 } 74 75 }