public class RestTestHarness extends BaseTestHarness
| Constructor and Description |
|---|
RestTestHarness(RESTfulServerProvider serverProvider) |
| Modifier and Type | Method and Description |
|---|---|
String |
checkQueryStatus(String xml,
String code) |
String |
getBaseURL() |
String |
query(String request)
Processes a "query" using a URL path (with no context path) + optional query params,
e.g.
|
void |
reload()
Reloads the core
|
String |
update(String xml)
Processes an "update" (add, commit or optimize) and
returns the response as a String.
|
String |
validateQuery(String request,
String... tests)
Validates a "query" response against an array of XPath test strings
|
checkUpdateStatus, commit, deleteById, deleteByQuery, getXmlDocumentBuilder, getXpath, makeSimpleDoc, optimize, simpleTag, validateErrorUpdate, validateUpdate, validateXPathpublic RestTestHarness(RESTfulServerProvider serverProvider)
public String getBaseURL()
public String validateQuery(String request, String... tests) throws Exception
request - the Query to processException - any exception in the response.IOException - if there is a problem writing the XMLpublic String query(String request) throws Exception
request - the URL path and optional query paramsException - any exception in the response.public String checkQueryStatus(String xml, String code) throws Exception
Exceptionpublic void reload()
throws Exception
BaseTestHarnessreload in class BaseTestHarnessExceptionpublic String update(String xml)
update in class BaseTestHarnessxml - The XML of the updateCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.