Package org.apache.james.test.mock.mailet

Examples of org.apache.james.test.mock.mailet.MockMailContext


    private void setupMailet() throws MessagingException {
        setupMockedMimeMessage();
        mailet = new SetMimeHeader();
        MockMailetConfig mci = new MockMailetConfig("Test",
                new MockMailContext());
        mci.setProperty("name", HEADER_NAME);
        mci.setProperty("value", HEADER_VALUE);

        mailet.init(mci);
    }
View Full Code Here


    private void setupMatcher() throws MessagingException {
        setupMockedMimeMessage();
        matcher = new HasMailAttribute();
        MockMatcherConfig mci = new MockMatcherConfig("HasMailAttribute="
                + MAIL_ATTRIBUTE_NAME, new MockMailContext());
        matcher.init(mci);
    }
View Full Code Here

    private void setupMatcher() throws MessagingException {
        setupMockedMimeMessage();
        matcher = new RecipientIsRegex();
        MockMatcherConfig mci = new MockMatcherConfig("RecipientIsRegex="
                + regex, new MockMailContext());
        matcher.init(mci);
    }
View Full Code Here

    private void setupMatcher() throws MessagingException {
        setupMockedMimeMessage();
        matcher = new FetchedFrom();
        MockMatcherConfig mci = new MockMatcherConfig("FetchedFrom="
                + HEADER_VALUE, new MockMailContext());
        matcher.init(mci);
    }
View Full Code Here

    }

    private void setupMatcher() throws MessagingException {
        matcher = new All();
        MockMatcherConfig mci = new MockMatcherConfig("All",
                new MockMailContext());
        matcher.init(mci);
    }
View Full Code Here

    private void setupMatcher() throws MessagingException {
        setupMockedMimeMessage();
        matcher = new HasMailAttributeWithValueRegex();
        MockMatcherConfig mci = new MockMatcherConfig("HasMailAttribute="
                + MAIL_ATTRIBUTE_NAME + ", " + regex, new MockMailContext());
        matcher.init(mci);
    }
View Full Code Here

    private void setupMatcher() throws MessagingException {
        setupMockedMimeMessage();
        matcher = new RecipientIs();
        MockMatcherConfig mci = new MockMatcherConfig("RecipientIs="
                + RECIPIENT_NAME, new MockMailContext());
        matcher.init(mci);
    }
View Full Code Here

    private void setupMatcher() throws MessagingException {
        setupMockedMimeMessage();
        matcher = new HasMailAttributeWithValue();
        MockMatcherConfig mci = new MockMatcherConfig("HasMailAttribute="
                + MAIL_ATTRIBUTE_NAME + ", " + MAIL_ATTRIBUTE_VALUE,
                new MockMailContext());
        matcher.init(mci);
    }
View Full Code Here

    private void setupMatcher() throws MessagingException {
        setupMockedMimeMessage();
        matcher = new HasHeader();
        MockMatcherConfig mci = new MockMatcherConfig("HasHeader="
                + HEADER_NAME, new MockMailContext());
        matcher.init(mci);
    }
View Full Code Here

    private MockServiceManager setUpServiceManager() throws Exception {
        m_serviceManager = new MockServiceManager();
        SimpleConnectionManager connectionManager = new SimpleConnectionManager();
        ContainerUtil.enableLogging(connectionManager, new MockLogger());
        m_serviceManager.put(JamesConnectionManager.ROLE, connectionManager);
        m_serviceManager.put("org.apache.mailet.MailetContext", new MockMailContext());
        m_mailServer = new MockMailServer();
        m_serviceManager.put(MailServer.ROLE, m_mailServer);
        m_serviceManager.put(UsersRepository.ROLE, m_usersRepository);
        m_serviceManager.put(SocketManager.ROLE, new MockSocketManager(m_smtpListenerPort));
        m_serviceManager.put(ThreadManager.ROLE, new MockThreadManager());
View Full Code Here

TOP

Related Classes of org.apache.james.test.mock.mailet.MockMailContext

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.