001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *     http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.commons.mail.mocks;
018    
019    import java.util.List;
020    
021    import javax.mail.internet.InternetAddress;
022    
023    import org.apache.commons.mail.SimpleEmail;
024    
025    /**
026     * Extension of SimpleEmail Class
027     * (used to allow testing only)
028     *
029     * @since 1.0
030     * @author <a href="mailto:corey.scott@gmail.com">Corey Scott</a>
031     * @version $Id: MockSimpleEmail.java 480401 2006-11-29 04:40:04Z bayard $
032     */
033    public class MockSimpleEmail extends SimpleEmail
034    {
035        /**
036         * Retrieve the message content
037         * @return Message Content
038         */
039        public String getMsg()
040        {
041            return (String) this.content;
042        }
043    
044        /**
045         * @return fromAddress
046         */
047        public InternetAddress getFromAddress()
048        {
049            return this.fromAddress;
050        }
051    
052        /**
053         * @return toList
054         */
055        public List getToList()
056        {
057            return this.toList;
058        }
059    
060        /**
061         * @return bccList
062         */
063        public List getBccList()
064        {
065            return this.bccList;
066        }
067    
068        /**
069         * @return ccList
070         */
071        public List getCcList()
072        {
073            return this.ccList;
074        }
075    
076    }