| Constructor and Description |
|---|
FakeDns() |
| Modifier and Type | Method and Description |
|---|---|
InetAddress |
address(int index) |
FakeDns |
addresses(List<InetAddress> addresses)
Sets the addresses to be returned by this fake DNS service.
|
void |
assertRequests(String... expectedHosts) |
List<InetAddress> |
lookup(String hostname) |
FakeDns |
unknownHost()
Sets the service to throw when a hostname is requested.
|
public FakeDns addresses(List<InetAddress> addresses)
public FakeDns unknownHost()
public InetAddress address(int index)
public List<InetAddress> lookup(String hostname) throws UnknownHostException
lookup in interface DnsUnknownHostExceptionpublic void assertRequests(String... expectedHosts)
Copyright © 2016. All Rights Reserved.