Search in sources :

Example 1 with NodeChildren

use of com.jayway.restassured.path.xml.element.NodeChildren in project ddf by codice.

the class TestConfiguration method assertMetacardsIngested.

private void assertMetacardsIngested(int expectedumberOfMetacards) throws Exception {
    String queryUrl = OPENSEARCH_PATH.getUrl() + "?q=*&format=xml&src=local";
    Response response = when().get(queryUrl);
    String bodyXml = response.body().asString();
    NodeChildren metacards = new XmlPath(bodyXml).get("metacards.metacard");
    assertThat(metacards.size(), is(expectedumberOfMetacards));
}
Also used : Response(com.jayway.restassured.response.Response) XmlPath(com.jayway.restassured.path.xml.XmlPath) Matchers.containsString(org.hamcrest.Matchers.containsString) NodeChildren(com.jayway.restassured.path.xml.element.NodeChildren)

Aggregations

XmlPath (com.jayway.restassured.path.xml.XmlPath)1 NodeChildren (com.jayway.restassured.path.xml.element.NodeChildren)1 Response (com.jayway.restassured.response.Response)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1