Search in sources :

Example 21 with NameValuePairList

use of org.apache.sling.commons.testing.integration.NameValuePairList in project sling by apache.

the class ReferenceTypeHintTest method testReferenceTypesCreatedFromUuids.

public void testReferenceTypesCreatedFromUuids() throws Exception {
    final NameValuePairList props = new NameValuePairList();
    props.add("r", firstUuid);
    props.add("r@TypeHint", "Reference");
    props.add("w", firstUuid);
    props.add("w@TypeHint", "WeakReference");
    props.add("rs", firstUuid);
    props.add("rs", secondUuid);
    props.add("rs@TypeHint", "Reference[]");
    props.add("ws", firstUuid);
    props.add("ws", secondUuid);
    props.add("ws@TypeHint", "WeakReference[]");
    final String referencingNodeUrl = testClient.createNode(postUrl + SlingPostConstants.DEFAULT_CREATE_SUFFIX, props, null, false);
    verifyReferences(referencingNodeUrl);
}
Also used : NameValuePairList(org.apache.sling.commons.testing.integration.NameValuePairList)

Aggregations

NameValuePairList (org.apache.sling.commons.testing.integration.NameValuePairList)21 HashMap (java.util.HashMap)13 JsonObject (javax.json.JsonObject)11 ArrayList (java.util.ArrayList)2 JsonArray (javax.json.JsonArray)2 NameValuePair (org.apache.commons.httpclient.NameValuePair)2 Repository (javax.jcr.Repository)1 Session (javax.jcr.Session)1 SimpleCredentials (javax.jcr.SimpleCredentials)1 ObservationManager (javax.jcr.observation.ObservationManager)1 JsonString (javax.json.JsonString)1 Credentials (org.apache.commons.httpclient.Credentials)1 HttpMethod (org.apache.commons.httpclient.HttpMethod)1 UsernamePasswordCredentials (org.apache.commons.httpclient.UsernamePasswordCredentials)1 HttpTest (org.apache.sling.commons.testing.integration.HttpTest)1 NamespaceContext (org.custommonkey.xmlunit.NamespaceContext)1 SimpleNamespaceContext (org.custommonkey.xmlunit.SimpleNamespaceContext)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1