Examples of DNSService


Examples of org.apache.james.dnsservice.api.DNSService

    /**
     * Test case for JAMES-1251
     */
    @Test
    public void testIteratorContainMultipleMX() {
        DNSService dns = new DNSService() {

            @Override
            public InetAddress getLocalHost() throws UnknownHostException {
                throw new UnsupportedOperationException();
            }
View Full Code Here

Examples of org.apache.james.dnsservice.api.DNSService

        assertFalse(it.hasNext());
    }

    @Test
    public void testIteratorWithInvalidMX() {
        DNSService dns = new DNSService() {

            @Override
            public InetAddress getLocalHost() throws UnknownHostException {
                throw new UnsupportedOperationException();
            }
View Full Code Here

Examples of org.apache.james.dnsservice.api.DNSService

        }
        return configuration;
    }

    private DNSService setUpDNSServer(final String hostName) {
        DNSService dns = new MockDNSService() {

            @Override
            public String getHostName(InetAddress inet) {
                return hostName;
            }
View Full Code Here

Examples of org.apache.james.dnsservice.api.DNSService

    /**
     * Setup the mocked dnsserver
     *
     */
    private DNSService setupMockedDnsServer() {
        DNSService mockedDnsServer = new MockDNSService() {

            @Override
            public Collection findTXTRecords(String hostname) {
                List res = new ArrayList();
                if (hostname == null) {
View Full Code Here

Examples of org.apache.james.dnsservice.api.DNSService

        };
        return session;
    }

    private DNSService setupMockedDNSServer() {
        DNSService dns = new MockDNSService() {

            @Override
            public Collection findMXRecords(String hostname) {
                Collection mx = new ArrayList();
View Full Code Here

Examples of org.apache.james.dnsservice.api.DNSService

    @Test
    public void testRejectLoopbackMX() throws ParseException, MailAddressException {
        Collection bNetworks = new ArrayList();
        bNetworks.add("127.0.0.1");

        DNSService dns = setupMockedDNSServer();
        MailAddress mailAddress = new MailAddress("test@" + INVALID_HOST);
        SMTPSession session = setupMockedSMTPSession(mailAddress);
        ValidRcptMX handler = new ValidRcptMX();

        handler.setDNSService(dns);
View Full Code Here

Examples of org.apache.james.jspf.core.DNSService

    protected List internalLoadTests(String filename) throws IOException {
        return loadTests(filename);
    }

    protected DNSService getDNSService() {
        DNSService dns = super.getDNSService();
        // Remove record limits for this test
        dns.setRecordLimit(0);
        return dns;
    }
View Full Code Here

Examples of org.apache.james.jspf.core.DNSService

    /**
     * Setup the mocked dnsserver
     *
     */
    private void setupMockedDnsService() {
        mockedDnsService = new DNSService() {

            public List getLocalDomainNames() {
                throw new UnsupportedOperationException(
                        "Unimplemented mock service");
            }
View Full Code Here

Examples of org.apache.james.jspf.core.DNSService

    public static Test suite() throws IOException {
        return new MailZoneAsynchronousSuite();
    }

    protected DNSService getDNSService() {
        DNSService dns = super.getDNSService();
        // Remove record limits for this test
        dns.setRecordLimit(0);
        return dns;
    }
View Full Code Here

Examples of org.apache.james.jspf.core.DNSService

    public static Test suite() throws IOException {
        return new MailZoneSuite();
    }

    protected DNSService getDNSService() {
        DNSService dns = super.getDNSService();
        // Remove record limits for this test
        dns.setRecordLimit(0);
        return dns;
    }
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.