Package org.apache.james.protocols.smtp.utils

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


    private final static String INVALID_HOST = "invalid.host.de";
    private final static String INVALID_MX = "mx." + INVALID_HOST;
    private final static String LOOPBACK = "127.0.0.1";

    private SMTPSession setupMockedSMTPSession(final MailAddress rcpt) {
        SMTPSession session = new BaseFakeSMTPSession() {

            private final HashMap<String, Object> sstate = new HashMap<String, Object>();
            private final HashMap<String, Object> connectionState = new HashMap<String, Object>();

            @Override
View Full Code Here


public class MaxUnknownCmdHandlerTest {

   
    @Test
    public void testRejectAndClose() throws MailAddressException {
        SMTPSession session = new BaseFakeSMTPSession() {
            private final HashMap<String,Object> map = new HashMap<String,Object>();

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

public class SpamTrapHandlerTest {
    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() {
            @Override
            public InetSocketAddress getRemoteAddress() {
                return new InetSocketAddress(getRemoteIPAddress(), 10000);
            }
           
View Full Code Here

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

            public Map<String,Object> getState() {

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


public class MaxRcptHandlerTest {
   
    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

    /**
     * Setup mocked smtpsession
     */
    private void setupMockedSMTPSession(final MailAddress rcpt) {
        mockedSMTPSession = new BaseFakeSMTPSession() {
            HashMap<String,Object> sessionState = new HashMap<String,Object>();
            HashMap<String,Object> connectionState = new HashMap<String,Object>();
           
            @Override
            public InetSocketAddress getRemoteAddress() {
View Full Code Here

    private Mail mockedMail;
    public final static String SPAMD_HOST = "localhost";

    private SMTPSession setupMockedSMTPSession(final Mail mail) {
        mockedMail = mail;
        SMTPSession mockedSMTPSession = new BaseFakeSMTPSession() {

            private final HashMap<String, Object> sstate = new HashMap<String, Object>();
            private final HashMap<String, Object> connectionState = new HashMap<String, Object>();
            private final String ipAddress = "192.168.0.1";
            private final String host = "localhost";
View Full Code Here

public class POP3BeforeSMTPHandlerTest {

    private SMTPSession mockedSession;

    private void setupMockedSMTPSession() {
        mockedSession = new BaseFakeSMTPSession() {

            private boolean relayingAllowed = false;

            @Override
            public InetSocketAddress getRemoteAddress() {
View Full Code Here

    private static final String URISERVER = "multi.surbl.org.";
    private Mail mockedMail;

    private SMTPSession setupMockedSMTPSession(final Mail mail) {
        mockedMail = mail;
        SMTPSession mockedSMTPSession = new BaseFakeSMTPSession() {

            private final String ipAddress = "192.168.0.1";
            private final String host = "localhost";
            private boolean relayingAllowed;
View Full Code Here

TOP

Related Classes of org.apache.james.protocols.smtp.utils.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.