Examples of DNSCache


Examples of javax.jmdns.impl.DNSCache

        assertNotNull("Could not create a new DNS cache.", cache);
    }

    @Test
    public void testCacheAddEntry() {
        DNSCache cache = new DNSCache();

        DNSEntry entry = new DNSRecord.Service("pierre._home-sharing._tcp.local.", DNSRecordClass.CLASS_IN, false, 0, 0, 0, 0, "panoramix.local.");
        cache.addDNSEntry(entry);
        assertEquals("Could not retrieve the value we inserted", entry, cache.getDNSEntry(entry));

    }
View Full Code Here

Examples of javax.jmdns.impl.DNSCache

    }

    @Test
    public void testCacheRemoveEntry() {
        DNSCache cache = new DNSCache();

        DNSEntry entry = new DNSRecord.Service("pierre._home-sharing._tcp.local.", DNSRecordClass.CLASS_IN, false, 0, 0, 0, 0, "panoramix.local.");
        cache.addDNSEntry(entry);
        assertEquals("Could not retrieve the value we inserted", entry, cache.getDNSEntry(entry));
        cache.removeDNSEntry(entry);
        assertNull("Could not remove the value we inserted", cache.getDNSEntry(entry));

    }
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.