Search in sources :

Example 16 with ObjectPropertyReference

use of org.xwiki.model.reference.ObjectPropertyReference in project xwiki-platform by xwiki.

the class LESSObjectPropertyResourceReferenceTest method getContent.

@Test
public void getContent() throws Exception {
    ObjectPropertyReference objectPropertyReference = new ObjectPropertyReference("property", new ObjectReference("class", new DocumentReference("wiki", "Space", "Document")));
    LESSObjectPropertyResourceReference lessObjectPropertyResourceReference = new LESSObjectPropertyResourceReference(objectPropertyReference, entityReferenceSerializer, bridge);
    // Mock
    when(bridge.getProperty(eq(objectPropertyReference))).thenReturn("content");
    // Test
    assertEquals("content", lessObjectPropertyResourceReference.getContent("skin"));
}
Also used : ObjectPropertyReference(org.xwiki.model.reference.ObjectPropertyReference) ObjectReference(org.xwiki.model.reference.ObjectReference) DocumentReference(org.xwiki.model.reference.DocumentReference) Test(org.junit.Test)

Aggregations

ObjectPropertyReference (org.xwiki.model.reference.ObjectPropertyReference)16 DocumentReference (org.xwiki.model.reference.DocumentReference)10 BaseObject (com.xpn.xwiki.objects.BaseObject)9 XWikiDocument (com.xpn.xwiki.doc.XWikiDocument)6 Test (org.junit.Test)5 ObjectReference (org.xwiki.model.reference.ObjectReference)5 BaseObjectReference (com.xpn.xwiki.objects.BaseObjectReference)4 ArrayList (java.util.ArrayList)3 EntityReference (org.xwiki.model.reference.EntityReference)3 XWiki (com.xpn.xwiki.XWiki)2 XWikiContext (com.xpn.xwiki.XWikiContext)2 XWikiAttachment (com.xpn.xwiki.doc.XWikiAttachment)2 BaseProperty (com.xpn.xwiki.objects.BaseProperty)2 LESSResourceReference (org.xwiki.lesscss.resources.LESSResourceReference)2 AttachmentReference (org.xwiki.model.reference.AttachmentReference)2 LocalDocumentReference (org.xwiki.model.reference.LocalDocumentReference)2 Property (org.xwiki.rest.model.jaxb.Property)2 ObjectPropertyResource (org.xwiki.rest.resources.objects.ObjectPropertyResource)2 IntegerProperty (com.xpn.xwiki.objects.IntegerProperty)1 StringProperty (com.xpn.xwiki.objects.StringProperty)1