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

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


    }

    private void setupMailet() throws MessagingException {
        mailet = new ToProcessor();
        MockMailetConfig mci = new MockMailetConfig("Test",
                new MockMailContext());
        if (processor != null) {
            mci.setProperty("processor", processor);
        }
        if (notice != null) {
            mci.setProperty("notice", notice);
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 void setupMatcher() throws MessagingException {
        setupMockedMimeMessage();
        matcher = new HostIs();
        MockMatcherConfig mci = new MockMatcherConfig("HostIs=" + HOST_NAME,
                new MockMailContext());
        matcher.init(mci);
    }
View Full Code Here

    private String processAddFooter(String asciisource, String footer)
            throws MessagingException, IOException {
        Mailet mailet = new AddFooter();

        MockMailetConfig mci = new MockMailetConfig("Test",new MockMailContext());
        mci.setProperty("text",footer);

        mailet.init(mci);

        Mail mail = new MailImpl(new MimeMessage(Session
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 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 FetchedFrom();
        MockMatcherConfig mci = new MockMatcherConfig("FetchedFrom="
                + HEADER_VALUE, new MockMailContext());
        matcher.init(mci);
    }
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.