Package org.apache.james.domainlist.jdbc

Examples of org.apache.james.domainlist.jdbc.JDBCDomainList


  
   
    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.");

        assertEquals("two domain found",dom.getDomains().length,2);
       
        dom.removeDomain("domain1.");
        assertNull("two domain found",dom.getDomains());
       
    }
View Full Code Here


    }
 

    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();
        } catch (ConfigurationException e) {
            exception = true;
        }
   
        assertTrue("Exception thrown",exception);
View Full Code Here

TOP

Related Classes of org.apache.james.domainlist.jdbc.JDBCDomainList

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.