Search in sources :

Example 1 with SlingClient

use of org.apache.sling.testing.clients.SlingClient in project sling by apache.

the class MimeTypeServletHttpIT method assertMimeType.

private void assertMimeType(String path, String expected) throws Exception {
    SlingClient client = slingInstanceRule.getAdminClient();
    SlingHttpResponse response = client.doGet(path + ".mimetype.txt", 200);
    response.checkContentContains(expected);
}
Also used : SlingHttpResponse(org.apache.sling.testing.clients.SlingHttpResponse) SlingClient(org.apache.sling.testing.clients.SlingClient)

Example 2 with SlingClient

use of org.apache.sling.testing.clients.SlingClient in project sling by apache.

the class AbstractSlingClientGetServerUrlTest method testGetUrl.

@Test
public void testGetUrl() throws ClientException {
    SlingClient c = new SlingClient(URI.create(serverUrl), "USER", "PWD");
    assertEquals("", URI.create(expectedUrl), c.getUrl());
}
Also used : SlingClient(org.apache.sling.testing.clients.SlingClient) Test(org.junit.Test)

Example 3 with SlingClient

use of org.apache.sling.testing.clients.SlingClient in project sling by apache.

the class AbstractSlingClientGetPathTest method testGetPath.

@Test
public void testGetPath() throws ClientException, URISyntaxException {
    SlingClient c = new SlingClient(URI.create(serverUrl), "USER", "PWD");
    assertEquals(URI.create(expectedPath), c.getPath(inputUri));
}
Also used : SlingClient(org.apache.sling.testing.clients.SlingClient) Test(org.junit.Test)

Example 4 with SlingClient

use of org.apache.sling.testing.clients.SlingClient in project sling by apache.

the class AbstractSlingClientGetUrlTest method testGetUrlWithParam.

@Test
public void testGetUrlWithParam() throws ClientException {
    SlingClient c = new SlingClient(URI.create(serverUrl), "USER", "PWD");
    assertEquals("", URI.create(expectedUrl), c.getUrl(inputPath));
}
Also used : SlingClient(org.apache.sling.testing.clients.SlingClient) Test(org.junit.Test)

Example 5 with SlingClient

use of org.apache.sling.testing.clients.SlingClient in project sling by apache.

the class LaunchpadReadyIT method testLaunchpadReady.

@Test
public void testLaunchpadReady() throws Exception {
    SlingClient client = SLING_INSTANCE_RULE.getAdminClient();
    client.waitUntilExists("/apps/sightly", 1000, 20);
    client.waitUntilExists("/sightlytck", 1000, 20);
}
Also used : SlingClient(org.apache.sling.testing.clients.SlingClient) Test(org.junit.Test)

Aggregations

SlingClient (org.apache.sling.testing.clients.SlingClient)5 Test (org.junit.Test)4 SlingHttpResponse (org.apache.sling.testing.clients.SlingHttpResponse)1