Search in sources :

Example 6 with MicrodataHtmlClient

use of org.apache.sling.hapi.client.impl.microdata.MicrodataHtmlClient in project sling by apache.

the class GetPostTest method testValidGet.

@Test
public void testValidGet() throws ClientException, URISyntaxException {
    MicrodataHtmlClient client = new MicrodataHtmlClient(httpServer.getURI().toString());
    Document doc = client.get(GET_URL);
    Assert.assertThat("GET request failed", doc.toString(), new StringContains(OK_RESPONSE));
}
Also used : MicrodataHtmlClient(org.apache.sling.hapi.client.impl.microdata.MicrodataHtmlClient) Document(org.apache.sling.hapi.client.Document) StringContains(org.hamcrest.core.StringContains) Test(org.junit.Test)

Aggregations

Document (org.apache.sling.hapi.client.Document)6 MicrodataHtmlClient (org.apache.sling.hapi.client.impl.microdata.MicrodataHtmlClient)6 Test (org.junit.Test)6 Items (org.apache.sling.hapi.client.Items)3 ArrayList (java.util.ArrayList)1 NameValuePair (org.apache.http.NameValuePair)1 StringEntity (org.apache.http.entity.StringEntity)1 BasicNameValuePair (org.apache.http.message.BasicNameValuePair)1 StringContains (org.hamcrest.core.StringContains)1