Examples of BaseFakeSMTPSession


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

    private SMTPSession mockedSMTPSession;
    private Mail mockedMail;

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

            private HashMap state = new HashMap();

            private String ipAddress = "192.168.0.1";
View Full Code Here

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

    /**
     * Setup mocked smtpsession
     */
    private void setupMockedSMTPSession(final String ip, final String helo) {
        mockedSMTPSession = new BaseFakeSMTPSession() {
            HashMap state = new HashMap();

            HashMap connectionState = new HashMap();

            Mail mail = new FakeMail();
View Full Code Here

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

    public final static String SPAMD_HOST = "localhost";

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

            private HashMap state = new HashMap();

            private String ipAddress = "192.168.0.1";
View Full Code Here

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

    private void setupMockedMimeMessage() throws MessagingException {
        mockedMimeMessage = Util.createMimeMessage(headerName, headerValue);
    }

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

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

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

           
        });
    }

    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

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

    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() {
            HashMap state = new HashMap();
           
            public Map getState() {
                return state;
            }
View Full Code Here

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


    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

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>();
           
            @Override
            public InetSocketAddress getRemoteAddress() {
View Full Code Here

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

public class MaxUnknownCmdHandlerTest extends TestCase{

   
    public void testRejectAndClose() throws MailAddressException {
        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

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

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() {
            @Override
            public InetSocketAddress getRemoteAddress() {
                return new InetSocketAddress(getRemoteIPAddress(), 10000);
            }
           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.