Examples of MockFileSystem


Examples of org.apache.james.filesystem.api.mock.MockFileSystem

        configureAbstractJdbcUsersRepository(res, tableString);
        return res;
    }

    protected void configureAbstractJdbcUsersRepository(AbstractJdbcUsersRepository res, String tableString) throws Exception {
        res.setFileSystem(new MockFileSystem());
        DataSource dataSource = getDataSource();
        res.setDatasource(dataSource);
        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder();
        configuration.addProperty("[@destinationURL]", "db://maildb/" + tableString);
        configuration.addProperty("sqlFile", "file://conf/sqlResources.xml");
View Full Code Here

Examples of org.apache.james.filesystem.api.mock.MockFileSystem

        configureAbstractJdbcUsersRepository(res, tableString);
        return res;
    }

    protected void configureAbstractJdbcUsersRepository(AbstractJdbcUsersRepository res, String tableString) throws Exception {
        res.setFileSystem(new MockFileSystem());
        DataSource dataSource = getDataSource();

        res.setDatasource(dataSource);

        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder();
View Full Code Here

Examples of org.apache.james.filesystem.api.mock.MockFileSystem

     * @throws ConfigurationException
     * @throws Exception
     */
    @Override
    protected MailRepository getMailRepository() throws Exception {
        MockFileSystem fs = new MockFileSystem();
        FileMailRepository mr = new FileMailRepository();
        mr.setFileSystem(fs);
        mr.setLog(LoggerFactory.getLogger("MockLog"));
        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();
        defaultConfiguration.addProperty("[@destinationURL]", "file://target/var/mr");
View Full Code Here

Examples of org.apache.james.filesystem.api.mock.MockFileSystem

    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"));
View Full Code Here

Examples of org.apache.james.services.MockFileSystem

        m_dnsServer = new AlterableDNSServer();
        m_serviceManager.put("dnsservice", m_dnsServer);

        store = new MockMailStore();
        m_serviceManager.put("mailStore", store);
        fileSystem = new MockFileSystem();

        m_serviceManager.put("filesystem", fileSystem);
        m_serviceManager.put("org.apache.james.smtpserver.protocol.DNSService", dnsAdapter);
        m_serviceManager.put("virtualusertable", new VirtualUserTable() {
View Full Code Here

Examples of org.apache.james.services.MockFileSystem

    serviceManager.put("usersstore", usersStore);

    mailServer = new MockMailServer();
    serviceManager.put("mailserver", mailServer);
   
    filesystem = new MockFileSystem();
    serviceManager.put("filesystem", filesystem);


    dnsservice = setUpDNSServer();
    serviceManager.put("dnsservice", dnsservice);
View Full Code Here

Examples of org.apache.james.services.MockFileSystem

     * @throws ServiceException
     * @throws ConfigurationException
     * @throws Exception
     */
    protected MailRepository getMailRepository() throws Exception {
        MockFileSystem fs =  new MockFileSystem();
        DataSource datasource = TestUtil.getDataSource();
        JDBCMailRepository mr = new JDBCMailRepository();
       
        // only used for dbfile
        MockMailStore mockStore = new MockMailStore();
View Full Code Here

Examples of org.apache.james.services.MockFileSystem

       
        serviceManager.put("mailboxmanager", manager);
       
        dnsservice = setUpDNSServer();
        serviceManager.put("dnsservice", setUpDNSServer());
        fSystem = new MockFileSystem();
        serviceManager.put("filesystem",fSystem);
     
    }
View Full Code Here

Examples of org.apache.james.services.MockFileSystem

        m_dnsServer = new AlterableDNSServer();
        m_serviceManager.put("dnsservice", m_dnsServer);

        store = new MockMailStore();
        m_serviceManager.put("mailStore", store);
        fileSystem = new MockFileSystem();

        m_serviceManager.put("filesystem", fileSystem);
        m_serviceManager.put("org.apache.james.smtpserver.protocol.DNSService", dnsAdapter);
        m_serviceManager.put("virtualusertable", new VirtualUserTable() {
View Full Code Here

Examples of org.apache.james.services.MockFileSystem

    public void testAddRemoveGetDomains() throws Exception {
       
   
        JDBCDomainList dom = new JDBCDomainList();
        dom.setDNSService(setUpDNSServer("localhost"));
        dom.setFileSystem(new MockFileSystem());
        dom.setDataSource(data);
        dom.setLog(new SimpleLog("MockLog"));
        dom.configure(setUpConfiguration(repos + table));
        dom.init();
        dom.addDomain("domain1.");
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.