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

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


    }

    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);
        }
        mailet.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
                .getDefaultInstance(new Properties()),
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

        RemoteDelivery rd = new RemoteDelivery();
       
        MockMailContext mmc = new MockMailContext();
        mmc.setAttribute(Constants.AVALON_COMPONENT_MANAGER,m_serviceManager);
        mmc.setAttribute(Constants.HELLO_NAME,"localhost");
        MockMailetConfig mci = new MockMailetConfig("Test",mmc,getStandardParameters());
        mci.setProperty("bind", "127.0.0.1");
        mci.setProperty("gateway","127.0.0.1");
        mci.setProperty("gatewayPort",""+m_smtpListenerPort);
        rd.init(mci);
        String sources = "Content-Type: text/plain;\r\nSubject: test\r\n\r\nBody";
        String sender = "test@localhost";
        String recipient = "test@localhost";
        MimeMessage mm = new MimeMessage(Session.getDefaultInstance(new Properties()),new ByteArrayInputStream(sources.getBytes()));
View Full Code Here

        RemoteDelivery rd = new RemoteDelivery();
       
        MockMailContext mmc = new MockMailContext();
        mmc.setAttribute(Constants.AVALON_COMPONENT_MANAGER,m_serviceManager);
        mmc.setAttribute(Constants.HELLO_NAME,"localhost");
        MockMailetConfig mci = new MockMailetConfig("Test",mmc,getStandardParameters());
        mci.setProperty("gateway","127.0.0.1");
        mci.setProperty("gatewayPort",""+m_smtpListenerPort);
        rd.init(mci);
       
        String sources = "Content-Type: text/plain;\r\nContent-Transfer-Encoding: quoted-printable\r\nSubject: test\r\n\r\nBody=80\r\n";
        //String sources = "Content-Type: text/plain; charset=iso-8859-15\r\nContent-Transfer-Encoding: quoted-printable\r\nSubject: test\r\n\r\nBody=80\r\n";
        //String sources = "Content-Type: text/plain; charset=iso-8859-15\r\nContent-Transfer-Encoding: 8bit\r\nSubject: test\r\n\r\nBody\u20AC\r\n";
View Full Code Here

    }

    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);
        }
        mailet.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
                .getDefaultInstance(new Properties()),
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

        RemoteDelivery rd = new RemoteDelivery();
       
        MockMailContext mmc = new MockMailContext();
        mmc.setAttribute(Constants.AVALON_COMPONENT_MANAGER,m_serviceManager);
        mmc.setAttribute(Constants.HELLO_NAME,"localhost");
        MockMailetConfig mci = new MockMailetConfig("Test",mmc,getStandardParameters());
        mci.setProperty("bind", "127.0.0.1");
        mci.setProperty("gateway","127.0.0.1");
        mci.setProperty("gatewayPort",""+m_smtpListenerPort);
        rd.init(mci);
        String sources = "Content-Type: text/plain;\r\nSubject: test\r\n\r\nBody";
        String sender = "test@localhost";
        String recipient = "test@localhost";
        MimeMessage mm = new MimeMessage(Session.getDefaultInstance(new Properties()),new ByteArrayInputStream(sources.getBytes()));
View Full Code Here

        RemoteDelivery rd = new RemoteDelivery();
       
        MockMailContext mmc = new MockMailContext();
        mmc.setAttribute(Constants.AVALON_COMPONENT_MANAGER,m_serviceManager);
        mmc.setAttribute(Constants.HELLO_NAME,"localhost");
        MockMailetConfig mci = new MockMailetConfig("Test",mmc,getStandardParameters());
        mci.setProperty("gateway","127.0.0.1");
        mci.setProperty("gatewayPort",""+m_smtpListenerPort);
        rd.init(mci);
       
        String sources = "Content-Type: text/plain;\r\nContent-Transfer-Encoding: quoted-printable\r\nSubject: test\r\n\r\nBody=80\r\n";
        //String sources = "Content-Type: text/plain; charset=iso-8859-15\r\nContent-Transfer-Encoding: quoted-printable\r\nSubject: test\r\n\r\nBody=80\r\n";
        //String sources = "Content-Type: text/plain; charset=iso-8859-15\r\nContent-Transfer-Encoding: 8bit\r\nSubject: test\r\n\r\nBody\u20AC\r\n";
View Full Code Here

TOP

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

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.