Search in sources :

Example 1 with WikiUIExtension

use of org.xwiki.uiextension.internal.WikiUIExtension in project xwiki-platform by xwiki.

the class WikiUIExtensionTest method createWikiUIExtension.

@Test
public void createWikiUIExtension() {
    WikiUIExtension wikiUIX = new WikiUIExtension("roleHint", "id", "epId", objectReference, AUTHOR_REFERENCE, null);
    wikiUIX.setScope(WikiComponentScope.WIKI);
    Assert.assertEquals("roleHint", wikiUIX.getRoleHint());
    Assert.assertEquals("id", wikiUIX.getId());
    Assert.assertEquals("epId", wikiUIX.getExtensionPointId());
    Assert.assertEquals(AUTHOR_REFERENCE, wikiUIX.getAuthorReference());
    Assert.assertEquals(UIExtension.class, wikiUIX.getRoleType());
    Assert.assertEquals(WikiComponentScope.WIKI, wikiUIX.getScope());
    Assert.assertEquals(new WordBlock(""), wikiUIX.execute());
    Assert.assertEquals(MapUtils.EMPTY_MAP, wikiUIX.getParameters());
}
Also used : WikiUIExtension(org.xwiki.uiextension.internal.WikiUIExtension) WordBlock(org.xwiki.rendering.block.WordBlock) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 WordBlock (org.xwiki.rendering.block.WordBlock)1 WikiUIExtension (org.xwiki.uiextension.internal.WikiUIExtension)1