Package org.apache.james.mailrepository.file

Examples of org.apache.james.mailrepository.file.MBoxMailRepository


*/
public class MBoxMailRepositoryTest extends TestCase {

   
    protected MailRepository getMailRepository() throws  Exception {
        MBoxMailRepository mr = new MBoxMailRepository();

        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();
       
        File fInbox = new MockFileSystem().getFile("file://conf/org/apache/james/mailrepository/testdata/Inbox");
        String mboxPath = "mbox://"+fInbox.toURI().toString().substring(new File("").toURI().toString().length());
       
        defaultConfiguration.addProperty("[@destinationURL]",mboxPath);
        defaultConfiguration.addProperty("[@type]","MAIL");
        mr.setLog(new SimpleLog("MockLog"));;
        mr.configure(defaultConfiguration);

        return mr;
    }
View Full Code Here


* common mail repository tests on the MBox implementation.
*/
public class MBoxMailRepositoryTest {

    protected MailRepository getMailRepository() throws Exception {
        MBoxMailRepository mr = new MBoxMailRepository();

        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();

        File fInbox = new MockFileSystem().getFile("file://conf/org/apache/james/mailrepository/testdata/Inbox");
        String mboxPath = "mbox://" + fInbox.toURI().toString().substring(new File("").toURI().toString().length());

        defaultConfiguration.addProperty("[@destinationURL]", mboxPath);
        defaultConfiguration.addProperty("[@type]", "MAIL");
        mr.setLog(LoggerFactory.getLogger("MockLog"));
        mr.configure(defaultConfiguration);

        return mr;
    }
View Full Code Here

TOP

Related Classes of org.apache.james.mailrepository.file.MBoxMailRepository

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.