Examples of MockFileSystem


Examples of org.apache.james.services.MockFileSystem

    public void testThrowConfigurationException() throws Exception {
        boolean exception = false;
        JDBCDomainList dom = new JDBCDomainList();
        dom.setDNSService(setUpDNSServer("localhost"));
        dom.setFileSystem(new MockFileSystem());
        dom.setDataSource(data);
        dom.setLog(new SimpleLog("MockLog"));
        dom.configure(new DefaultConfigurationBuilder());
        try {
            dom.init();
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();
        FileMailRepository mr = new FileMailRepository();
        MockMailStore mockStore = new MockMailStore();
        FilePersistentStreamRepository file_Persistent_Stream_Repository = new FilePersistentStreamRepository();
        file_Persistent_Stream_Repository.setFileSystem(fs);
        file_Persistent_Stream_Repository.setLog(new SimpleLog("MockLog"));
View Full Code Here

Examples of org.apache.james.services.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(new SimpleLog("MockLog"));;
View Full Code Here

Examples of org.apache.james.services.MockFileSystem

     */
    protected AbstractVirtualUserTable getVirtualUserTable() throws Exception {
        JDBCVirtualUserTable virtualUserTable = new JDBCVirtualUserTable();
        virtualUserTable.setLog(new SimpleLog("MockLog"));
        virtualUserTable.setDataSource(TestUtil.getDataSource());
        virtualUserTable.setFileSystem(new MockFileSystem());
        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();
        defaultConfiguration.addProperty("[@destinationURL]","db://maildb/VirtualUserTable");
        defaultConfiguration.addProperty("sqlFile","file://conf/sqlResources.xml");
        virtualUserTable.configure(defaultConfiguration);
        virtualUserTable.init();
View Full Code Here

Examples of org.apache.james.services.MockFileSystem

     * @param tableString
     * @throws Exception
     * @throws ConfigurationException
     */
    protected void configureAbstractJdbcUsersRepository(AbstractJdbcUsersRepository res, String tableString) throws Exception, ConfigurationException {
        res.setFileSystem(new MockFileSystem());
        DataSource dataSource = TestUtil.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.services.MockFileSystem

     * @param tableString
     * @throws Exception
     * @throws ConfigurationException
     */
    protected void configureAbstractJdbcUsersRepository(AbstractJdbcUsersRepository res, String tableString) throws Exception, ConfigurationException {
        res.setFileSystem(new MockFileSystem());
        DataSource dataSource = TestUtil.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.services.MockFileSystem

     * @param tableString
     * @throws Exception
     * @throws ConfigurationException
     */
    protected void configureAbstractJdbcUsersRepository(AbstractJdbcUsersRepository res, String tableString) throws Exception, ConfigurationException {
        res.setFileSystem(new MockFileSystem());
        DataSource dataSource = TestUtil.getDataSource()
       
        res.setDatasource(dataSource );
       
        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder();
View Full Code Here

Examples of org.apache.slider.server.appmaster.model.mock.MockFileSystem

    ContainerLauncher launcher = createNiceMock(ContainerLauncher.class);
    Path generatedConfPath = new Path(".", "test");
    MapOperations resourceComponent = new MapOperations();
    MapOperations appComponent = new MapOperations();
    Path containerTmpDirPath = new Path(".", "test");
    FileSystem mockFs = new MockFileSystem();
    expect(sliderFileSystem.getFileSystem())
        .andReturn(new FilterFileSystem(mockFs)).anyTimes();
    expect(sliderFileSystem.createAmResource(anyObject(Path.class),
                                             anyObject(LocalResourceType.class)))
        .andReturn(createNiceMock(LocalResource.class)).anyTimes();
View Full Code Here

Examples of org.apache.slider.server.appmaster.model.mock.MockFileSystem

    ContainerLauncher launcher = createNiceMock(ContainerLauncher.class);
    Path generatedConfPath = new Path(".", "test");
    MapOperations resourceComponent = new MapOperations();
    MapOperations appComponent = new MapOperations();
    Path containerTmpDirPath = new Path(".", "test");
    FileSystem mockFs = new MockFileSystem();
    expect(sliderFileSystem.getFileSystem())
        .andReturn(new FilterFileSystem(mockFs)).anyTimes();
    expect(sliderFileSystem.createAmResource(anyObject(Path.class),
                                             anyObject(LocalResourceType.class)))
        .andReturn(createNiceMock(LocalResource.class)).anyTimes();
View Full Code Here

Examples of org.apache.slider.server.appmaster.model.mock.MockFileSystem

    ContainerLauncher launcher = createNiceMock(ContainerLauncher.class);
    Path generatedConfPath = new Path(".", "test");
    MapOperations resourceComponent = new MapOperations();
    MapOperations appComponent = new MapOperations();
    Path containerTmpDirPath = new Path(".", "test");
    FileSystem mockFs = new MockFileSystem();
    expect(sliderFileSystem.getFileSystem())
        .andReturn(new FilterFileSystem(mockFs)).anyTimes();
    expect(sliderFileSystem.createAmResource(anyObject(Path.class),
                                             anyObject(LocalResourceType.class)))
        .andReturn(createNiceMock(LocalResource.class)).anyTimes();
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.