public final class RestClientDriver extends Object
| Modifier and Type | Method and Description |
|---|---|
static ClientDriverResponse |
giveEmptyResponse()
Creates a new
ClientDriverResponse object with no content. |
static ClientDriverResponse |
giveResponse(String content)
Deprecated.
Use
giveResponse(String, String) instead. |
static ClientDriverResponse |
giveResponse(String content,
String contentType)
Creates a new
ClientDriverResponse object. |
static ClientDriverResponse |
giveResponseAsBytes(InputStream content,
String contentType)
Creates a new
ClientDriverResponse object. |
static ClientDriverRequest |
onRequestTo(org.hamcrest.Matcher<? extends String> path)
Creates a new
ClientDriverRequest object. |
static ClientDriverRequest |
onRequestTo(Pattern path)
Creates a new
ClientDriverRequest object. |
static ClientDriverRequest |
onRequestTo(String path)
Creates a new
ClientDriverRequest object. |
static void |
waitFor(BodyCapture<?> bodyCapture,
long time,
TimeUnit timeUnit)
Waits for specified time for populated
BodyCapture object. |
public static ClientDriverRequest onRequestTo(org.hamcrest.Matcher<? extends String> path)
ClientDriverRequest object.path - The path to matchpublic static ClientDriverRequest onRequestTo(String path)
ClientDriverRequest object.path - The path to matchpublic static ClientDriverRequest onRequestTo(Pattern path)
ClientDriverRequest object.path - The path to match@Deprecated public static ClientDriverResponse giveResponse(String content)
giveResponse(String, String) instead.ClientDriverResponse object.content - The content to returnpublic static ClientDriverResponse giveResponse(String content, String contentType)
ClientDriverResponse object.content - The content to returncontentType - The content-type of the responsepublic static ClientDriverResponse giveResponseAsBytes(InputStream content, String contentType)
ClientDriverResponse object.content - The content to returncontentType - The content-type of the responsepublic static ClientDriverResponse giveEmptyResponse()
ClientDriverResponse object with no content.public static void waitFor(BodyCapture<?> bodyCapture, long time, TimeUnit timeUnit)
BodyCapture object.bodyCapture - The capture to wait for.time - The number of units (given in timeUnit) to wait for.timeUnit - The unitCopyright © 2013. All Rights Reserved.