public final class ClientDriverRule extends Object implements org.junit.rules.TestRule
| Constructor and Description |
|---|
ClientDriverRule()
Creates a new rule with a driver running on a free port.
|
ClientDriverRule(int port)
Creates a new rule with a driver running on the specified port.
|
| Modifier and Type | Method and Description |
|---|---|
ClientDriverExpectation |
addExpectation(ClientDriverRequest request,
ClientDriverResponse response)
Adds an expectation on the ClientDriver to expect the given request and response.
|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
String |
getBaseUrl()
The base URL of the underlying ClientDriver.
|
void |
whenCompleted(ClientDriverCompletedListener listener)
The given listener will be registered with the Client Driver and executes once execution has
completed.
|
public ClientDriverRule()
public ClientDriverRule(int port)
port - The port on which the driver should listenpublic org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
apply in interface org.junit.rules.TestRulepublic ClientDriverExpectation addExpectation(ClientDriverRequest request, ClientDriverResponse response)
request - The request to expectresponse - The response to expectpublic String getBaseUrl()
public void whenCompleted(ClientDriverCompletedListener listener)
listener - The listenerCopyright © 2013. All Rights Reserved.