|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.solr.util.BaseTestHarness
public abstract class BaseTestHarness
| Constructor Summary | |
|---|---|
BaseTestHarness()
|
|
| Method Summary | |
|---|---|
String |
checkUpdateStatus(String xml,
String code)
Validates that an "update" (add, commit or optimize) results in success. |
static String |
commit(String... args)
Helper that returns an <commit> String with optional key/val pairs. |
static String |
deleteById(String id,
String... args)
Generates a delete by id xml string |
static String |
deleteByQuery(String q,
String... args)
Generates a delete by query xml string |
static DocumentBuilder |
getXmlDocumentBuilder()
|
static XPath |
getXpath()
|
static StringBuffer |
makeSimpleDoc(String... fieldsAndValues)
A helper that creates an xml <doc> containing all of the fields and values specified |
static String |
optimize(String... args)
Helper that returns an <optimize> String with optional key/val pairs. |
abstract void |
reload()
Reloads the core |
static String |
simpleTag(String tag,
String... args)
|
abstract String |
update(String xml)
Processes an "update" (add, commit or optimize) and returns the response as a String. |
String |
validateErrorUpdate(String xml)
Validates that an "update" (add, commit or optimize) results in success. |
String |
validateUpdate(String xml)
Validates that an "update" (add, commit or optimize) results in success. |
static String |
validateXPath(String xml,
String... tests)
A helper method which validates a String against an array of XPath test strings. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseTestHarness()
| Method Detail |
|---|
public static DocumentBuilder getXmlDocumentBuilder()
public static XPath getXpath()
public static String validateXPath(String xml,
String... tests)
throws XPathExpressionException,
SAXException
xml - The xml String to validatetests - Array of XPath strings to test (in boolean mode) on the xml
XPathExpressionException
SAXExceptionpublic static StringBuffer makeSimpleDoc(String... fieldsAndValues)
fieldsAndValues - 0 and Even numbered args are fields names odds are field values.
public static String deleteByQuery(String q,
String... args)
q - Query that has not already been xml escapedargs - The attributes of the delete tag
public static String deleteById(String id,
String... args)
id - ID that has not already been xml escapedargs - The attributes of the delete tagpublic static String optimize(String... args)
args - 0 and Even numbered args are params, Odd numbered args are values.
public static String simpleTag(String tag,
String... args)
public static String commit(String... args)
args - 0 and Even numbered args are params, Odd numbered args are values.
public abstract void reload()
throws Exception
Exceptionpublic abstract String update(String xml)
xml - The XML of the update
public String validateUpdate(String xml)
throws SAXException
xml - The XML of the update
SAXException
public String validateErrorUpdate(String xml)
throws SAXException
xml - The XML of the update
SAXException
public String checkUpdateStatus(String xml,
String code)
throws SAXException
xml - The XML of the update
SAXException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||