public abstract class AbstractTest extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractTest.Service |
Modifier and Type | Field and Description |
---|---|
protected static String |
JSON_ACCESS |
protected com.squareup.okhttp.mockwebserver.MockWebServer |
server |
Constructor and Description |
---|
AbstractTest() |
Modifier and Type | Method and Description |
---|---|
protected void |
afterTest() |
protected void |
associateClient(OSClient os) |
protected String |
authURL(String path) |
protected OSClient |
os() |
protected void |
respondWith(int statusCode)
Responds with negative based response code and no body
|
protected void |
respondWith(Map<String,String> headers,
int statusCode)
Responds with negative based response code and no body and optional headers
|
protected void |
respondWith(String resource)
The path to the expected JSON results
|
protected abstract AbstractTest.Service |
service() |
protected void |
startServer() |
protected static final String JSON_ACCESS
protected com.squareup.okhttp.mockwebserver.MockWebServer server
protected abstract AbstractTest.Service service()
protected void startServer()
protected void respondWith(String resource) throws IOException
resource
- the resourceIOException
- Signals that an I/O exception has occurred.protected void respondWith(int statusCode)
statusCode
- the status code to respond withprotected void respondWith(Map<String,String> headers, int statusCode)
headers
- optional headersstatusCode
- the status code to respond withprotected void afterTest()
protected void associateClient(OSClient os)
protected OSClient os()
Copyright © 2014. All rights reserved.