Examples of MockDNSService


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

    serviceManager.put("mailStore", new MockMailStore());
 
  }

  private DNSService setUpDNSServer() {
    DNSService dns = new MockDNSService() {
      public String getHostName(InetAddress addr) {
        return "localhost";
      }

      public InetAddress getLocalHost() throws UnknownHostException {
View Full Code Here

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

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

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

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

        };

    }

    protected void setupDNSServer() {
        dnsServer = new MockDNSService() {
            public InetAddress getByName(String host)
                    throws UnknownHostException {
                if ("192.168.200.0".equals(host) || "255.255.255.0".equals(host) || "192.168.200.1".equals(host) || "192.168.0.1".equals(host) || "192.168.1.1".equals(host)) {
                    // called with an IP it only check formal validity
                    return InetAddress.getByName(host);
View Full Code Here

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

    public InSpammerBlacklistTest(String arg0) throws UnsupportedEncodingException {
        super(arg0);
    }

    private DNSService setUpDNSServer() {
        DNSService dns = new MockDNSService() {
            public InetAddress getByName(String name) throws UnknownHostException {
                if (name.equals(LISTED_HOST.reverse() + "." + BLACKLIST)) {
                    return null;
                } else {
                    throw new UnknownHostException("Not listed");
View Full Code Here

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

     *
     * @param hostName
     * @return
     */
    private DNSService setUpDNSServer(final String hostName) {
        DNSService dns = new MockDNSService() {
            public String getHostName(InetAddress inet) {
                return hostName;
            }
            public InetAddress[] getAllByName(String name) throws UnknownHostException {
                return new InetAddress[] { InetAddress.getByName("127.0.0.1")};
View Full Code Here

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

        };
        return session;
    }

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

            public Collection findMXRecords(String hostname) {
                Collection mx = new ArrayList();

                if (hostname.equals(INVALID_HOST)) {
View Full Code Here

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

        }
        return configuration;
    }
   
    private DNSService setUpDNSServer(final String hostName) {
        DNSService dns = new MockDNSService() {
            public String getHostName(InetAddress inet) {
                return hostName;
            }
           
            public InetAddress[] getAllByName(String name) throws UnknownHostException {
View Full Code Here

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

        serviceManager.put("filesystem",fSystem);
     
    }

    private DNSService setUpDNSServer() {
        DNSService dns = new MockDNSService() {
            public String getHostName(InetAddress addr) {
                return "localhost";
            }
           
            public InetAddress getLocalHost() throws UnknownHostException {
View Full Code Here

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

        configuration.addProperty("sqlFile", "file://conf/sqlResources.xml");
        return configuration;
    }
   
    private DNSService setUpDNSServer(final String hostName) {
        DNSService dns = new MockDNSService() {
            public String getHostName(InetAddress inet) {
                return hostName;
            }
           
            public InetAddress[] getAllByName(String name) throws UnknownHostException {
View Full Code Here

Examples of org.apache.james.dnsservice.api.mock.MockDNSService

        };

    }

    protected void setupDNSServer() {
        dnsServer = new MockDNSService() {

            @Override
            public InetAddress getByName(String host) throws UnknownHostException {
                if ("192.168.200.0".equals(host)
                        || "255.255.255.0".equals(host)
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.