Search in sources :

Example 1 with ResourcesResourceReference

use of org.xwiki.resource.resources.ResourcesResourceReference in project xwiki-platform by xwiki.

the class IntegrationTest method extractResourceReference.

@Test
public void extractResourceReference() throws Exception {
    // Entity Resource References
    assertURL("http://localhost:8080/xwiki/bin/view/space/page", EntityResourceReference.TYPE, new EntityResourceReference(new DocumentReference("xwiki", "space", "page"), EntityResourceAction.VIEW));
    assertURL("http://localhost:8080/xwiki/wiki/mywiki/view/space/page", new ResourceType("wiki"), new EntityResourceReference(new DocumentReference("mywiki", "space", "page"), EntityResourceAction.VIEW));
    // Resources Resource References
    assertURL("http://localhost:8080/xwiki/resources/js/prototype/prototype.js", ResourcesResourceReference.TYPE, new ResourcesResourceReference());
    // Skins Resource References
    assertURL("http://localhost:8080/xwiki/skins/flamingo/logo.png", SkinsResourceReference.TYPE, new SkinsResourceReference());
}
Also used : ResourcesResourceReference(org.xwiki.resource.resources.ResourcesResourceReference) SkinsResourceReference(org.xwiki.resource.skins.SkinsResourceReference) EntityResourceReference(org.xwiki.resource.entity.EntityResourceReference) ResourceType(org.xwiki.resource.ResourceType) DocumentReference(org.xwiki.model.reference.DocumentReference) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DocumentReference (org.xwiki.model.reference.DocumentReference)1 ResourceType (org.xwiki.resource.ResourceType)1 EntityResourceReference (org.xwiki.resource.entity.EntityResourceReference)1 ResourcesResourceReference (org.xwiki.resource.resources.ResourcesResourceReference)1 SkinsResourceReference (org.xwiki.resource.skins.SkinsResourceReference)1