Search in sources :

Example 16 with EntityReferenceProvider

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

the class AbstractEntityJobTest method configure.

@Override
@Before
public void configure() throws Exception {
    super.configure();
    this.authorization = getMocker().getInstance(AuthorizationManager.class);
    this.observationManager = getMocker().getInstance(ObservationManager.class);
    EntityReferenceProvider defaultEntityReferenceProvider = getMocker().getInstance(EntityReferenceProvider.class);
    when(defaultEntityReferenceProvider.getDefaultReference(EntityType.DOCUMENT)).thenReturn(new EntityReference("WebHome", EntityType.DOCUMENT, null));
}
Also used : EntityReferenceProvider(org.xwiki.model.reference.EntityReferenceProvider) EntityReference(org.xwiki.model.reference.EntityReference) ObservationManager(org.xwiki.observation.ObservationManager) AuthorizationManager(org.xwiki.security.authorization.AuthorizationManager) Before(org.junit.Before)

Aggregations

EntityReferenceProvider (org.xwiki.model.reference.EntityReferenceProvider)16 Before (org.junit.Before)10 EntityReference (org.xwiki.model.reference.EntityReference)7 XWikiContext (com.xpn.xwiki.XWikiContext)4 DocumentReference (org.xwiki.model.reference.DocumentReference)4 WikiReference (org.xwiki.model.reference.WikiReference)4 XWiki (com.xpn.xwiki.XWiki)3 Test (org.junit.Test)3 BinaryStringEncoder (org.xwiki.crypto.BinaryStringEncoder)3 StringReader (java.io.StringReader)2 DocumentAccessBridge (org.xwiki.bridge.DocumentAccessBridge)2 DocumentModelBridge (org.xwiki.bridge.DocumentModelBridge)2 SpaceReference (org.xwiki.model.reference.SpaceReference)2 Query (org.xwiki.query.Query)2 QueryManager (org.xwiki.query.QueryManager)2 WordBlock (org.xwiki.rendering.block.WordBlock)2 XDOM (org.xwiki.rendering.block.XDOM)2 Parser (org.xwiki.rendering.parser.Parser)2 AuthorizationManager (org.xwiki.security.authorization.AuthorizationManager)2 AfterComponent (org.xwiki.test.annotation.AfterComponent)2