Package org.apache.james.protocols.smtp

Examples of org.apache.james.protocols.smtp.BaseFakeSMTPSession


    /**
     * Setup mocked smtpsession
     */
    private void setupMockedSMTPSession(final MailAddress rcpt) {
        mockedSMTPSession = new BaseFakeSMTPSession() {
            HashMap<String,Object> state = new HashMap<String,Object>();
            HashMap<String,Object> connectionState = new HashMap<String,Object>();
           
            public String getRemoteIPAddress() {
                return remoteIp;
View Full Code Here


public class MaxUnknownCmdHandlerTest extends TestCase{

   
    public void testRejectAndClose() throws ParseException {
        SMTPSession session = new BaseFakeSMTPSession() {
            private final HashMap<String,Object> state = new HashMap<String,Object>();

            public Map<String,Object> getState() {
                return state;
            }
View Full Code Here

           
        });
    }

    private SMTPSession setupMockedSMTPSession(final SMTPConfiguration conf, final MailAddress rcpt, final boolean relayingAllowed) {
        SMTPSession session = new BaseFakeSMTPSession() {
            HashMap<String,Object> state = new HashMap<String,Object>();

            public boolean isRelayingAllowed() {
                return relayingAllowed;
            }
View Full Code Here

    /**
     * Setup mocked smtpsession
     */
    private void setupMockedSMTPSession(final MailAddress rcpt) {
        mockedSMTPSession = new BaseFakeSMTPSession() {
            HashMap<String,Object> state = new HashMap<String,Object>();
            HashMap<String,Object> connectionState = new HashMap<String,Object>();
           
            public String getRemoteIPAddress() {
                return remoteIp;
View Full Code Here

public class TarpitHandlerTest extends TestCase {

    private SMTPSession session;

    private SMTPSession setupMockedSession(final int rcptCount) {
        session = new BaseFakeSMTPSession() {

            public int getRcptCount() {
                return rcptCount;
            }
           
View Full Code Here

public class SpamTrapHandlerTest extends TestCase {
    private static final String SPAM_TRAP_RECIP1 = "spamtrap1@localhost";
    private static final String RECIP1 = "recip@localhost";
   
    private SMTPSession setUpSMTPSession(final String ip) {
        return new BaseFakeSMTPSession() {
            public String getRemoteIPAddress() {
                return ip;
            }
       
        };
View Full Code Here

        };
        return dns;
    }
   
    private SMTPSession setupMockedSession(final MailAddress sender) {
        SMTPSession session = new BaseFakeSMTPSession() {
            HashMap<String,Object> state = new HashMap<String,Object>();

            public Map<String,Object> getState() {

                state.put(SMTPSession.SENDER, sender);
View Full Code Here


public class MaxRcptHandlerTest extends TestCase{
   
    private SMTPSession setupMockedSession(final int rcptCount) {
        SMTPSession session = new BaseFakeSMTPSession() {
            HashMap<String,Object> state = new HashMap<String,Object>();

            public Map<String,Object> getState() {
                return state;
            }
View Full Code Here


    private SMTPSession setupMockSession(final String argument,
             final boolean relaying, final boolean authRequired, final String user, final MailAddress recipient) {
       
        SMTPSession session = new BaseFakeSMTPSession() {

            HashMap<String,Object> connectionMap = new HashMap<String,Object>();
            HashMap<String,Object> map = new HashMap<String,Object>();
           
            public boolean isAuthSupported() {
View Full Code Here

public class POP3BeforeSMTPHandlerTest extends TestCase {

    private SMTPSession mockedSession;

    private void setupMockedSMTPSession() {
        mockedSession = new BaseFakeSMTPSession() {
            private boolean relayingAllowed = false;

            public String getRemoteIPAddress() {
                return "192.168.200.1";
            }
View Full Code Here

TOP

Related Classes of org.apache.james.protocols.smtp.BaseFakeSMTPSession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.