Search in sources :

Example 1 with RenderingConfiguration

use of org.xwiki.rendering.configuration.RenderingConfiguration in project xwiki-platform by xwiki.

the class XWikiLinkLabelGeneratorTest method setUp.

@Before
public void setUp() throws Exception {
    RenderingConfiguration configuration = this.mocker.getInstance(RenderingConfiguration.class);
    when(configuration.getLinkLabelFormat()).thenReturn("%l%la%n%na%N%NA [%w:%s.%p] %ls %np %P %NP (%t) [%w:%s.%p] %ls %np %P %NP (%t)");
    EntityReferenceProvider entityReferenceProvider = this.mocker.getInstance(EntityReferenceProvider.class);
    when(entityReferenceProvider.getDefaultReference(EntityType.DOCUMENT)).thenReturn(new EntityReference("WebHome", EntityType.DOCUMENT));
}
Also used : EntityReferenceProvider(org.xwiki.model.reference.EntityReferenceProvider) EntityReference(org.xwiki.model.reference.EntityReference) RenderingConfiguration(org.xwiki.rendering.configuration.RenderingConfiguration) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 EntityReference (org.xwiki.model.reference.EntityReference)1 EntityReferenceProvider (org.xwiki.model.reference.EntityReferenceProvider)1 RenderingConfiguration (org.xwiki.rendering.configuration.RenderingConfiguration)1